🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.mail.mush
Article #140

SIGHUP and SIGTERM

#140
From: Fletcher Mattox
Date: Sun, 13 Aug 1989 18:22
30 lines
1291 bytes
Why are these two signals handled in catch() even when IGN_SIGS is 
turned on?

    if (ison(glob_flags, IGN_SIGS) && sig != SIGTERM && sig != SIGHUP)
	    return;

What happens if a SIGHUP arrives during copyback() while signals
are supposed to be ignored?

Consider:

1. User types 'quit'.
2. copyback() turns on IGN_SIGS and begins to write the folder.
   (This can take many seconds with a large folder on a busy NFS server).
3. Before copyback() can finish, user shuts down his window manager,
   or his modem drops DTR, or ...
4. Mush catches the resultant signal and eventually exits.
5. copyback() never finishes and user's folder is corrupt.

This has happened enough times around here that I'll probably 
either add a new global flag, REALLY_IGN_SIGS, or change the
above fragment to:

    if (ison(glob_flags, IGN_SIGS))
	    return;

Can something equivalent be added to the mush distribution?

Thanks
Fletcher
Technical Details
Message-ID: <6701@cs.utexas.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!fletcher

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!fletcher
From: fletcher@cs.utexas.edu (Fletcher Mattox)
Newsgroups: comp.mail.mush
Subject: SIGHUP and SIGTERM
Keywords: smushed folders
Message-ID: <6701@cs.utexas.edu>
Date: 13 Aug 89 18:22:24 GMT
Organization: U. Texas CS Dept., Austin, Texas
Lines: 30