Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

soc_wake() - awaken a task waiting with select() or soc-poll()

&pagelevel(3)&pagelevel

#include <sys.socket.h>

Kernighan-Ritchie-C:
int soc_wake(pid);
int *pid;

ANSI-C:
int soc_wake(int* pid);


Description

The soc_wake() function can be used to awaken the task identified by *pid if the task is currently waiting with select() or soc_poll(). The soc_wake() call causes select() or soc_poll() to exit with a return value of “-1” and the error EINTR.

soc_wake() can awaken another task with the same user ID and, if called from a signal routine, can also awaken its own task.

*pid is a variable which must be supplied with the task sequence number (TSN) of the waiting task.
The task *pid must exist at the time of the soc_wake() call and have an opened socket. If the task *pid is not waiting with select(), the signal set by soc_wake() is assigned to the next select() call.

Return value

0:

If successful

-1:

If errors occur. errno is set to indicate the error.

Errors indicated by errno

ESRCH

There is no task with the number *pid. This may be either because *pid is an invalid task number or because the SOCKETS(BS2000) program has not yet been loaded.

EACCES

No access authorization. The task *pid has another user ID.