Sponsored Content
Top Forums Programming how to use function fork() in Windows NT Post 8445 by danieljorge on Thursday 11th of October 2001 02:27:29 PM
Old 10-11-2001
Question how to use function fork() in Windows NT

Hello,

I need to make a gateway from Ethernet to RS-485. I am using stream socket, and I am programming in windows nt. I would like to know how could I use some functions from unix in windows nt. I would like to use the function fork(). Which library it uses and how can I get it? Can I substitute fork using CreateThread, or do I need to CreateProcess.

PS:I have to make a server that gets the data from ethernet port and write to Serial port. My server has to accept a lot of connection.

Please, could you help me.

Regards

Paulapaula
 

5 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Endless loop - Fork function failed?

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

fork function

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

Passing global variable to a function which is called by another function

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

Need help with fork() on windows

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

Fork Function Failed on 4GB ?

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
SOCKET_CONNECT(3)							 1							 SOCKET_CONNECT(3)

socket_connect - Initiates a connection on a socket

SYNOPSIS
bool socket_connect (resource $socket, string $address, [int $port]) DESCRIPTION
Initiate a connection to $address using the socket resource $socket, which must be a valid socket resource created with socket_create(3). PARAMETERS
o $socket - o $address - The $address parameter is either an IPv4 address in dotted-quad notation (e.g. 127.0.0.1) if $socket is AF_INET, a valid IPv6 address (e.g. ::1) if IPv6 support is enabled and $socket is AF_INET6 or the pathname of a Unix domain socket, if the socket fam- ily is AF_UNIX. o $port - The $port parameter is only used and is mandatory when connecting to an AF_INET or an AF_INET6 socket, and designates the port on the remote host to which a connection should be made. RETURN VALUES
Returns TRUE on success or FALSE on failure. The error code can be retrieved with socket_last_error(3). This code may be passed to socket_strerror(3) to get a textual explanation of the error. Note If the socket is non-blocking then this function returns FALSE with an error Operation now in progress. SEE ALSO
socket_bind(3), socket_listen(3), socket_create(3), socket_last_error(3), socket_strerror(3). PHP Documentation Group SOCKET_CONNECT(3)
All times are GMT -4. The time now is 04:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy