All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Parvez Pathan" <parvezp@lycos.com>
To: linux-c-programming@vger.kernel.org
Subject: Cannot capture SIGPIPE
Date: Wed, 04 Feb 2004 13:23:01 +0530	[thread overview]
Message-ID: <MNIBOEAJBKPBGIAA@mailcity.com> (raw)

Hi All,
  I have  a server program which connect to clients c1 and c2. The server reads from c1 and writes to c2. Whenever c2 dies(or is killed) I get a SIGPIPE at the server. I have tried to capture the SIGPIPE but cant trap it. Some part of my code is as follows:

<code>
void cleanup (int x) { printf ("Quitting..."); exit(0); }
void back_to_work (int x) { printf ("Not Quitting..."); return; }

main ()
{
	signal (SIGINT, cleanup);
	signal (SIGPIPE, back_to_work);

	//rest of the program
}
</code>

The server is in a infinite loop. The server cannot capture a SIGPIPE given to it by the kill command (kill -PIPE <server pid>) also. Am I missing out anything??
Please help.

Thanks,
Parvez


____________________________________________________________
Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
http://login.mail.lycos.com/r/referral?aid=27005

             reply	other threads:[~2004-02-04  7:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-04  7:53 Parvez Pathan [this message]
2004-02-04 13:15 ` Cannot capture SIGPIPE Glynn Clements
  -- strict thread matches above, loose matches on Subject: below --
2004-02-04  9:13 romesh sahu
2004-02-04 11:17 Parvez Pathan
2004-02-04 14:12 Colovic (ext_evosoft) Aleksandar
2004-02-04 22:20 ` Glynn Clements

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MNIBOEAJBKPBGIAA@mailcity.com \
    --to=parvezp@lycos.com \
    --cc=linux-c-programming@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.