• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Redirect to log?

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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???
 
High Plains Drifter
Posts: 7289
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Lasagna is spaghetti flvored cake. Just like this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic