Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [pkg/26351] Re: CVS commit: src/usr.bin/ftp



On Tue, Jul 20, 2004 at 04:28:26PM +0300, Ognyan Kulev wrote:
  | (All my tests are on Debian GNU/Linux testing.)
  | 
  | I've applied these diffs to bootstrap, ftp returns exit code 130 when 
  | it's interrupted, but shell continues to loop.  So exit code greater 
  | than 128 is not enough alone.
  | 
  | So when SIGINT is received, the only correct way to handle it is to set 
  | SIGINT to SIG_DFL and raise SIGINT.  Patch is attached that do this and 
  | that works.  (I'm not sure if sigaction should be used.)

Thanks.  I've reworked ftp to use this method (although not exactly
the same code).


  | And there is one more question: is SIGINT enough?  Looking at list of 
  | signals[1], those that terminate process (without core dump) and are 
  | usually issued by user are SIGHUP, SIGINT and SIGTERM.  I think all 
  | these should be handled this way.

ftp(1) doesn't have a specific handler for SIGHUP or SIGTERM,
and the editline EL_SIGNAL stuff appears to use the "default"
handler after doing it's own thing.
Unless bash needs the non zero exit code _and_ the WIFSIGNALED()
result to break out of the while loop ?

Attachment: pgpYp3P77SAKl.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index