On 01/10/11 22:58, Alex B. wrote:
Hi,
I'm migrating code from Linux to Solaris 10 and I'm having some trouble with
fcntl() function. In the original code I've an attribute in fcntl() func -
O_ASYNC. This attribute exists in Linux only, therefore when I compile the code
in Solaris, I get an error that O_ASYNC is undeclared identifier.
What's the parallel mechanism in Solaris? With what can I replace the O_ASYNC
attrib.?
Thanks!
Alex
you can do a ioctl on the fd of I_SETSIG:
From the streamio man page:
I_SETSIG Informs the stream head that the user wishes
the kernel to issue the SIGPOLL signal (see
signal(3C)) when a particular event has
occurred on the stream associated with
fildes. I_SETSIG supports an asynchronous
processing capability in streams. The value
of arg is a bitmask that specifies the events
for which the user should be signaled. It is
the bitwise OR of any combination of the fol-
lowing constants:
....
On Solaris SIGIO == SIGPOLL
hth -
- Bart
--
Bart Smaalders Solaris Kernel Performance
bart.smaald...@oracle.com http://blogs.sun.com/barts
"You will contribute more with Mercurial than with Thunderbird."
"Civilization advances by extending the number of important
operations which we can perform without thinking about them."
_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code