LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-28-2010, 05:39 AM   #1
jayasekar
Member
 
Registered: May 2008
Posts: 39

Rep: Reputation: 16
Lightbulb Socket Error or nohup error ??


Hi friends,
1. I have created a client socket to receive a data from the server.
2. The data received from the server will be shown in the terminal.
3. i want to run this application as a background and i want to redirect the output to a file. and also i want to run this application even when i log out so i did as given below

nohup myprogram > foo.out 2> foo.err < /dev/null &

4. when i use
$tailf foo.out

Everything is fine. I can view the output

but
i cannot able to view the last data i received.

5. If i run that on terminal, everything is fine. i can able to see the data, even the last one i received.

If i run the same using nohup, i could not able to view the last received data.
Can any one help me out to solve this problem

Thanks in advance
 
Old 01-28-2010, 10:55 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
nohup myprogram > foo.out 2> foo.err &


no need for dev/null. Probably a buffering issue.
 
Old 01-29-2010, 01:51 AM   #3
jayasekar
Member
 
Registered: May 2008
Posts: 39

Original Poster
Rep: Reputation: 16
Thanks for your help.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
socket error skd70_2000@yahoo.com Linux - Newbie 1 09-15-2009 06:59 AM
Unable to connect to UNIX socket /tmp/.esd/socket error while using grip dr_zayus69 Linux - Software 4 08-23-2005 07:28 PM
hanging on boot with nohup error suterman Linux - Newbie 2 04-02-2004 09:29 AM
socket error adoyee Programming 3 02-07-2004 11:11 AM
wu-ftpd socket error ChaosX2 Linux - Networking 3 10-05-2001 01:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration