Perl Cheat Sheet Page 21

ADVERTISEMENT

umask
[
EXPR
]
Sets the umask for the process and returns the old one. If
EXPR
is omitted,
returns current umask value.
Waits for a child process to terminate and returns the process ID of the
wait
deceased process (-1 if none). The status is returned in $? .
waitpid PID, FLAGS
Performs the same function as the corresponding system call.
[
]
warn
LIST
Prints the
LIST
on STDERR like
die
, but does not exit.
defaults to "Warning: something’s wrong" .
LIST
23. Networking
accept NEWSOCKET, GENERICSOCKET
Accepts a new socket.
bind SOCKET, NAME
Binds the
NAME
to the
SOCKET
.
connect SOCKET, NAME
Connects the
NAME
to the
SOCKET
.
getpeername SOCKET
Returns the socket address of the other end of the
SOCKET
.
getsockname SOCKET
Returns the name of the socket.
getsockopt SOCKET, LEVEL, OPTNAME
Returns the socket options.
listen SOCKET, QUEUESIZE
Starts listening on the specified
SOCKET
.
recv SOCKET, SCALAR, LENGTH, FLAGS
Receives a message on
SOCKET
.
send SOCKET, MSG, FLAGS [ , TO
]
Sends a message on the
.
SOCKET
setsockopt SOCKET, LEVEL, OPTNAME, OPTVAL
Sets the requested socket option.
shutdown SOCKET, HOW
Shuts down a
.
SOCKET
socket SOCKET, DOMAIN, TYPE, PROTOCOL
Creates a
in
with
and
.
SOCKET
DOMAIN
TYPE
PROTOCOL
socketpair SOCKET1, SOCKET2, DOMAIN, TYPE, PROTOCOL
As socket, but creates a pair of bi-directional sockets.
24. SystemV IPC
Depending on your system configuration, certain system files need to be
require
d
to access the message and semaphore specific facilities.
msgctl ID, CMD, ARGS
Calls msgctl(2). If
CMD
is IPC_STAT then
ARGS
must be a single variable.
See the manual for details on the non-standard return values of this function.
21

ADVERTISEMENT

00 votes

Related Articles

Related forms

Related Categories

Parent category: Education