mc.sh & mc.csh creation fixed...
[midnight-commander.git] / vfs / tcputil.c
blob4efd3be2cdb0458e39f588470f88a3b22d4341f0
1 /* Network utilities for the Midnight Commander Virtual File System.
3 Copyright (C) 1995, 1996 Miguel de Icaza
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public License
7 as published by the Free Software Foundation; either version 2 of
8 the License, or (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public
16 License along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
19 #include <config.h>
20 #include <stdlib.h>
21 #include <stdio.h>
22 #include <signal.h>
23 #include <sys/types.h>
25 #include "tcputil.h"
26 #include "utilvfs.h"
28 int got_sigpipe;
30 static void
31 sig_pipe (int unused)
33 got_sigpipe = 1;
36 void
37 tcp_init (void)
39 struct sigaction sa;
41 got_sigpipe = 0;
42 sa.sa_handler = sig_pipe;
43 sa.sa_flags = 0;
44 sigemptyset (&sa.sa_mask);
45 sigaction (SIGPIPE, &sa, NULL);