• Post Reply Bookmark Topic Watch Topic
  • New Topic

Redirect to log?  RSS feed

 
sonny kher
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am starting my ppp dialer using
wvdial isp > /var/log/ppp.log &
but it still doesn't seem to redirect output to the log file and any time I close the terminal the daemon dies???
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This line redirects the standard output file to the file you named instead of the screen. Your program is probably sending output to the standard error file, also the screen by default. You could illustrate this difference in your command line by showing the descriptor number standard output is know by (1):

To make sure that both standard output and error write to the log, use this:

Here the shell is told to send data passed through the standard error descriptor (or "2" for short here) to the same location as 1, which is /var/log/ppp.log.
Putting a process in the background does not mean the program will run if you log out. To do that, use the nohup command, like this:

As you log out, your shell might complain that processes are running, but that's just a warning that you're leaving something unattended.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!