Thread View: comp.unix.sys5.r3
3 messages
3 total messages
Started by Anastasios Kotsikonas
Mon, 02 Nov 1992 17:19
how to get SIGIO
Author: Anastasios Kotsikonas
Date: Mon, 02 Nov 1992 17:19
Date: Mon, 02 Nov 1992 17:19
15 lines
792 bytes
792 bytes
Hi all, I am trying to write a client that does async socket I/O but I cannot grab the SIGIO signal: - I am setting the socket as asynchronous - I am assigning the socket to the process group - I am grabbing the SIGIO signal but I never get it; I only have this problem on certain SVR3 systems (SGI's system works as expected). Any help will be greatly appreciated. Tasos
Re: how to get SIGIO
Author: Christoph Badura
Date: Tue, 03 Nov 1992 23:25
Date: Tue, 03 Nov 1992 23:25
18 lines
1003 bytes
1003 bytes
In <100320@bu.edu> tasos@cs.bu.edu (Anastasios Kotsikonas) writes: >I am trying to write a client that does async socket I/O but I cannot grab the >SIGIO signal: >but I never get it; I only have this problem on certain SVR3 systems (SGI's >system works as expected). You have to tell us more. Especially what version of UNIX you're trying this on and what your code looks like. All that can be said now is that certain (in fact most) SVR3 systems don't support SIGIO. -- Christoph Badura --- bad@flatlin.ka.sub.org AIX is a better... is a better... is a better... OpenSystem. IBM Rep at GUUG Symposium '92
Re: how to get SIGIO
Author: Anastasios Kotsikonas
Date: Fri, 06 Nov 1992 17:34
Date: Fri, 06 Nov 1992 17:34
68 lines
2416 bytes
2416 bytes
In article <Bx5yE7.DDn@flatlin.ka.sub.org> bad@flatlin.ka.sub.org (Christoph Badura) writes:
>In <100320@bu.edu> tasos@cs.bu.edu (Anastasios Kotsikonas) writes:
>
>>I am trying to write a client that does async socket I/O but I cannot grab the
>>SIGIO signal:
>>but I never get it; I only have this problem on certain SVR3 systems (SGI's
>>system works as expected).
>
>You have to tell us more. Especially what version of UNIX you're
>trying this on and what your code looks like.
>
>All that can be said now is that certain (in fact most) SVR3 systems
>don't support SIGIO.
Here are excerpts of the code:
First catch the signals:
signal (SIGIO, (void (*)()) urg_data);
signal (SIGURG, (void (*)()) urg_data);
then once I have the socket:
#ifdef sco
if (ioctl (sock_fd, I_SETSIG, S_INPUT) < 0) {
perror ("Cannot set SIGIO");
return -1;
}
#else
# ifdef F_SETOWN
if (fcntl (sock_fd, F_SETOWN, getpid()) < 0) {
perror ("Cannot assign socket to process group");
return -1;
}
# elif defined (SIOCSPGRP)
value = -getpid();
if (ioctl (sock_fd, SIOCSPGRP, (char *) &value) < 0) {
perror ("Cannot assign socket to process group");
return -1;
}
# else
perror ("Cannot assign socket to process group");
return -1;
# endif
# ifdef FASYNC
if (fcntl (sock_fd, F_SETFL, (fcntl (sock_fd, F_GETFL, 0) | FASYNC)) < 0) {
perror ("Cannot set asynchronous I/O for socket");
return -1;
}
# elif defined (FIOASYNC)
value = 1;
if (ioctl (sock_fd, FIOASYNC, (char *) &value) < 0) {
perror ("Cannot set asynchronous I/O for socket");
return -1;
}
# else
perror ("Cannot set asynchronous I/O for socket");
return -1;
# endif
#endif
return sock_fd;
Any help will be greatly appreciated.
Tasos
PS: and BTW, I disagree with your .signature: AIX is the worst UNIX I have
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads