mirror of
https://gitlab.xiph.org/xiph/ezstream.git
synced 2024-12-04 14:46:31 -05:00
Ignore SIGPIPE, which turned out to be the cause for silent deaths of long-
running ezstream processes. git-svn-id: https://svn.xiph.org/trunk/ezstream@14255 0101bb08-14d6-0310-b084-bc0e0c8e3800
This commit is contained in:
parent
0856c44749
commit
ddb6c4091f
8
NEWS
8
NEWS
@ -1,3 +1,11 @@
|
|||||||
|
Changes in 0.5.3 (SVN):
|
||||||
|
|
||||||
|
* src/ezstream.c:
|
||||||
|
- [FIX] Prevent (very) long-running ezstream processes from dying without
|
||||||
|
error message by ignoring SIGPIPE where available.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Changes in 0.5.2, released on 2007-11-04:
|
Changes in 0.5.2, released on 2007-11-04:
|
||||||
|
|
||||||
* src/ezstream.c:
|
* src/ezstream.c:
|
||||||
|
@ -132,7 +132,11 @@ void usageHelp(void);
|
|||||||
int ez_shutdown(int);
|
int ez_shutdown(int);
|
||||||
|
|
||||||
#ifdef HAVE_SIGNALS
|
#ifdef HAVE_SIGNALS
|
||||||
void sig_handler(int);
|
void sig_handler(int);
|
||||||
|
|
||||||
|
# ifndef SIG_IGN
|
||||||
|
# define SIG_IGN (void (*)(int))1
|
||||||
|
# endif /* !SIG_IGN */
|
||||||
|
|
||||||
void
|
void
|
||||||
sig_handler(int sig)
|
sig_handler(int sig)
|
||||||
@ -1250,6 +1254,16 @@ main(int argc, char *argv[])
|
|||||||
return (ez_shutdown(1));
|
return (ez_shutdown(1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
* Ignore SIGPIPE, which has been seen to give a long-running ezstream
|
||||||
|
* process trouble. EOF and/or EPIPE are also easier to handle.
|
||||||
|
*/
|
||||||
|
act.sa_handler = SIG_IGN;
|
||||||
|
if (sigaction(SIGPIPE, &act, NULL) == -1) {
|
||||||
|
printf("%s: sigaction(): %s\n",
|
||||||
|
__progname, strerror(errno));
|
||||||
|
return (ez_shutdown(1));
|
||||||
|
}
|
||||||
#endif /* HAVE_SIGNALS */
|
#endif /* HAVE_SIGNALS */
|
||||||
|
|
||||||
if (shout_open(shout) == SHOUTERR_SUCCESS) {
|
if (shout_open(shout) == SHOUTERR_SUCCESS) {
|
||||||
|
Loading…
Reference in New Issue
Block a user