Hi Justin, By abort I mean abandon the pending read or recv call on the socket without closing the connection. The receive runs on a separate thread and I can send that thread a signal via pthread_kill() to kick it back out of the system call. What I was trying to accomplish via the sorwakeup() call was to roust the kernel thread out of the read/recv call in much the same fashion - I'm probably missing some small but important bit about setting the state of the socket state machine, etc. Ideas? -Rob On 1-Apr-04, at 8:36 AM, Justin Walker wrote:
On Mar 31, 2004, at 21:26, Rob McKeever wrote:
Hi,
I'm stumped with a problem...
I've got a BSD socket connection from inside a kext on another thread
and I'm trying to find a way to cause it to abort without using a
timeout or closing the connection. From userland, I've done the same
thing by using a signal to abort the syscall, but haven't been able to
figure out how to do the same thing from kernelspace.
I've tried issuing sorwakeup() on my socket, but it seems to have no
effect. I've tried a few other bit too, but this is the one that
seemed to make the most sense. Anyone have any ideas?
What do you mean by "abort"? If you do this in user mode, you kill
the process, causing the kernel to shut down (close) all open file
descriptors. 'sorwakeup' just wakes up those processes waiting for
the receive side of the socket to get data.
What are you trying to achieve?
Regards,
Justin
--
Justin C. Walker, Curmudgeon-At-Large *
Institute for General Semantics | "Weaseling out of things is
what
| separates us from the
animals.
| Well, except the weasel."
| - Homer J Simpson
*--------------------------------------
*-------------------------------*
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s] _______________________________________________ darwin-kernel mailing list | darwin-kernel@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel Do not post admin requests to the list. They will be ignored.