Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: unexpected quit - no error message

by kp2a (Sexton)
on Mar 02, 2009 at 18:20 UTC ( #747516=note: print w/ replies, xml ) Need Help??


in reply to Re: unexpected quit - no error message
in thread unexpected quit - no error message

AH! Thanks - I am learning - did not know about

"This generates a SIGPIPE signal, whose default handler action is to abort the program (assuming you're on Unix)"

Yes, UNIX, is there any other OS? I will check for that out. Try to catch it.

two questions:
why $? = 0 = success on abort?
why an abort after> a successful write to the socket? - the device was updated AOK.

thanks other suggestions - I do have debug statements around the spot where it seems to quit - again they must have been executed but the output does not appear! I assume that if it is an abort, the output buffer is not written???

correction: using IO::Socket


Comment on Re^2: unexpected quit - no error message
Re^3: unexpected quit - no error message
by almut (Canon) on Mar 02, 2009 at 19:18 UTC
    two questions:
    why $? = 0 = success on abort?
    why an abort after a successful write to the socket? - the device was updated AOK.

    If we had something to look at, we'd need to guess less :)

    Could you show the significant parts of your code?  Preferably also an strace of a run that did abort (the last 20, or so, lines should be sufficient, typically).

Re^3: unexpected quit - no error message
by CountZero (Bishop) on Mar 02, 2009 at 21:11 UTC
    If you don't see the debug messages, you may be suffering from buffering. This may be especially the case when the program terminates unexpectedly and the script is not able to flush its buffers.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://747516]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2014-08-23 06:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (172 votes), past polls