Author Topic: Why stack trace with nohup doesn't go to my log?  (Read 1478 times)

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Why stack trace with nohup doesn't go to my log?
« on: February 20, 2019, 12:07:41 AM »
I normally run SlickEdit on Linux via nohup (from a script) like this:

Code: [Select]
nohup vs >> logfile.log 2>&1 &
So I expect that all stdout and stderr should get saved into logfile.log. I found this trick here: https://unix.stackexchange.com/questions/45913/is-there-a-way-to-redirect-nohup-output-to-a-log-file-other-than-nohup-out

However, occasionally SlickEdit crashes and I see a stack trace printed to the terminal where I launched SE. That happened recently for the issue I wrote about here: https://community.slickedit.com/index.php/topic,16828.0.html

But for the topic of this thread, I would like to know why this stack trace is not in my logfile and instead appears on the terminal where I launched SE?

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1818
  • Hero Points: 151
Re: Why stack trace with nohup doesn't go to my log?
« Reply #1 on: February 20, 2019, 01:56:14 PM »
When it's a glibc error, it will go out of it's way to write it to the tty rather than let it get redirected.  I've haven't tried it myself, but adding the environment variable "LIBC_FATAL_STDERR_=1" to the environment should force this output to stderr, where it will be redirected as usual.