Changeset c9e72d1 for global.c


Ignore:
Timestamp:
Nov 22, 2003, 11:33:00 AM (17 years ago)
Author:
Erik Nygren <nygren@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
1e34e40
Parents:
f1645da
Message:
	Catch SIGPIPE and print an error rather than crashing.
	        [It's possible that this may have some portability
		issues under Solaris and we may need to add some
		configure stuff around SA_SIGINFO...]
File:
1 edited

Legend:

Unmodified
Added
Removed
  • global.c

    r5a9f6fe rc9e72d1  
    105105
    106106  owl_errqueue_init(&(g->errqueue));
     107
     108  g->got_err_signal=0;
    107109}
    108110
     
    844846  return(&(g->errqueue));
    845847}
     848
     849void owl_global_set_errsignal(owl_global *g, int signum, siginfo_t *siginfo)
     850{
     851  g->got_err_signal = signum;
     852  if (siginfo) {
     853    g->err_signal_info = *siginfo;
     854  } else {
     855    memset(&(g->err_signal_info), 0, sizeof(siginfo_t));
     856  }
     857}
     858
     859int owl_global_get_errsignal_and_clear(owl_global *g, siginfo_t *siginfo)
     860{
     861  int signum;
     862  if (siginfo && g->got_err_signal) {
     863    *siginfo = g->err_signal_info;
     864  }
     865  signum = g->got_err_signal;
     866  g->got_err_signal = 0;
     867  return signum;
     868}
     869
Note: See TracChangeset for help on using the changeset viewer.