10-15-2001
Sounds like you want to use P Threads... P thread is not supported in the NT Environment. You need to find the pthread libraries for WIN32. Web site is
http://sources.redhat.com/pthreads-win32
There is a bunch of sample programs with it to help you out!!!
5 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need a quick script that will serve as a sort of "real time monitor" for watching some log files. I am using Bourne shell in HP-UX 10.20. I have basically created a script that never ends, unless of course I manually terminate it. Here's the script (it's called qhistory):
clear
echo "REAL... (3 Replies)
Discussion started by: cdunavent
3 Replies
2. UNIX for Dummies Questions & Answers
hi everyone,
have this little piece of code in order to help you understand my question
#include<stdio.h>
#include<unistd.h>
int main()
{
int i, pid;
pid = fork();
if(pid<0)
{
fprintf(stderr, "fork failed\n");
_exit(1);
}
if(pid==0)
{
printf("in Child\n");... (4 Replies)
Discussion started by: a25khan
4 Replies
3. Shell Programming and Scripting
Hi ,
I have three funcions f1, f2 and f3 .
f1 calls f2 and f2 calls f3 .
I have a global variable "period" which i want to pass to f3 .
Can i pass the variable directly in the definition of f3 ?
Pls help .
sars (4 Replies)
Discussion started by: sars
4 Replies
4. Shell Programming and Scripting
Here is my sample perl program.
my $pid = fork();
if(! $pid )
{
exec("perl sleep.pl 600");
}
else
{
print "PID ==== \n";
sleep 30;
print "killing the PID in 20 seconds\n";
sleep 20;
kill 9, $pid;
print "Done ....\n";
}
The PID returns... (1 Reply)
Discussion started by: hansini
1 Replies
5. AIX
Hello,
I am running Oracle Database and after a while I keep getting this message whenever I execute any command.
I cannot execute any command even shutdown, whenever I execute any command , I get this message
/usr/bin/ksh: 0403-031 The fork function failed. There is not enough memory... (7 Replies)
Discussion started by: filosophizer
7 Replies
LEARN ABOUT DEBIAN
socket_connect6
socket_connect6(3) Library Functions Manual socket_connect6(3)
NAME
socket_connect6 - attempt to make a TCP connection
SYNTAX
#include <socket.h>
int socket_connect6(int s, const char ip[16],
uint16 port,uint32 scope_id);
DESCRIPTION
socket_connect6 attempts to make a connection from TCP socket s to TCP port port on IP address ip.
The meaning of scope_id is dependent on the implementation and IPv6 IP. On link-local IPv6 addresses it specifies the outgoing interface
index. The name (e.g. "eth0") for a given interface index can be queried with getifname. scope_id should normally be set to 0.
socket_connect6 may return
o 0, to indicate that the connection succeeded (and succeeded immediately, if the socket is non-blocking)
o -1, setting errno to error_inprogress or error_wouldblock, to indicate that the socket is non-blocking
o -1, setting errno to something else, to indicate that the connection failed (and failed immediately, if the socket is non-blocking).
When a background connection succeeds or fails, s becomes writable; you can use socket_connected to see whether the connection succeeded.
If the connection failed, socket_connected returns 0, setting errno appropriately.
Once a TCP socket is connected, you can use the read and write system calls to transmit data.
You can call socket_connect6 without calling socket_bind6. This has the effect as first calling socket_bind6 with IP address :: and port
0.
EXAMPLE
#include <socket.h>
int s;
char ip[16];
uint16 p;
s = socket_tcp6();
socket_bind6(s,ip,p);
socket_connect6(s,ip,p,0);
SEE ALSO
socket_connect4(3), socket_getifname(3)
socket_connect6(3)