LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Socket Error or nohup error ?? (https://www.linuxquestions.org/questions/linux-software-2/socket-error-or-nohup-error-785313/)

jayasekar 01-28-2010 05:39 AM

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 :banghead: :scratch: :doh:

Thanks in advance :hattip:

chrism01 01-28-2010 10:55 PM

nohup myprogram > foo.out 2> foo.err &


no need for dev/null. Probably a buffering issue.

jayasekar 01-29-2010 01:51 AM

Thanks for your help.


All times are GMT -5. The time now is 07:16 AM.