Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Semi-OT] Signal app to give stack trace ?



On Wednesday, Oct 2, 2002, at 22:50 US/Pacific, Paul Roebuck wrote:

Dwayne Schultz <email@hidden> wrote:

#!/bin/sh
tail -f [...] &

This script quits immediately but the tail continues sending output to
the shell that started the script.

I have another script:
#!/bin/sh
java [...] &

This script also quits immediately but standard out appears to be lost
with it (which is why I couldn't get kill -QUIT to work).

This isn't as critical now but does any know what is going on here?
The script works as expected when I get rid of the '&'.

Eventually, you're going to have to learn more about Unix programming. A
few things are immediately relevant, though.

I think you missed my point but then again when re-reading my above post I wasn't being entirely clear. I wanted to know why tail was able to write to the outer shell (the one running interactively) but my java program wasn't.

As it turns out my program can write to the outer shell but for some reason the stack trace is getting lost. Evidently the signal handler isn't writing to stdout. At least not in the typical way. Bug?


I haven't checked your scenario. But normal Un*x programming dictates
that errors are printed to 'stderr', not 'stdout'.

I'm not sure if the signal handler is supposed to be writing to stdout or stderr but the information is getting lost in any case. In the above script, my java app can write to stdout and stderr. Only the signal handler output is lost.

This really isn't that big of a deal now that I know how to get to the information but it still sounds like a bug. Maybe someone at Apple can tell how the signal handler is writing it's output? I am willing to bet that it isn't a call to System.[out|err].println().

Dwayne
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Be sure to read the FAQ http://developer.apple.com/java/faq/ before posting
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: [Semi-OT] Signal app to give stack trace ? (From: Paul Roebuck <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.