473,383 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

"Fork" in Windows

Hi!

I have a problem converting a cgi-program to run on windows.

The problem is that the CGI is collecting a lot of information
(a orderhandlingsystem) and under unix the main process
makes a FORK and the new childprocess is continue
process the order (copying, make PDF etc. with is time
consuming)

The main process is exiting after childprocess is creating
and lett the webbserver continue.

Så in a short form

MAIN
1. Collect data
2. Fork to childprocess
3. exit main process
CHILD
1. make PDF, .....
2. Send confirmmail
3. Make bakups and cleaning
4. Exit

BUT... I have not found any way on doing this i Windows with C
I have found spawn and CreateCildProcess but thay will have a program
as indata
and i would like to CLONE current process.

Any one know how to do this (i am using Microsoft Compiler that came
with VisualStudio 6 eg. NOT .NET version.

Tanks
Anders

Mar 19 '07 #1
3 8905
anders wrote:
Hi!

I have a problem converting a cgi-program to run on windows.
Then you'll be better off asking on a windows programming group.

--
Ian Collins.
Mar 19 '07 #2
Ian Collins wrote:
anders wrote:
>Hi!

I have a problem converting a cgi-program to run on windows.
Then you'll be better off asking on a windows programming group.
But anyway, maybe shared memory or pipes can help you along?
Mar 19 '07 #3
anders wrote:
>
I have a problem converting a cgi-program to run on windows.

The problem is that the CGI is collecting a lot of information
(a orderhandlingsystem) and under unix the main process
makes a FORK and the new childprocess is continue
process the order (copying, make PDF etc. with is time
consuming)
Converting things to Winders is a retrograde step. None of this
has anything to do with the C language. You probably want a group
with Microsoft or Windoze in its name. See the following links:

--
Some useful references about C:
<http://www.ungerhu.com/jxh/clc.welcome.txt>
<http://www.eskimo.com/~scs/C-faq/top.html (C-faq)
<http://benpfaff.org/writings/clc/off-topic.html>
<http://anubis.dkuug.dk/jtc1/sc22/wg14/www/docs/n869/(C99)
<http://www.dinkumware.com/refxc.html (C-library}
<http://gcc.gnu.org/onlinedocs/ (GNU docs)
<http://clc-wiki.net/wiki/C_community:comp.lang.c:Introduction>
--
Posted via a free Usenet account from http://www.teranews.com

Mar 20 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Gavin Williams | last post by:
I am working on a multi-threaded server for a Windows 2000 system and since "fork" doesn't work that great in a Win32 environment, I am trying to use use the "threads" module instead. When a...
1
by: Sebastien | last post by:
Hello, I have a multi-thread programm in C under AIX. I get some lock or core dump that I cannot explain. I debugged the core and I found that it cored on the "_pthread_deactivatex". I also...
1
by: Huey | last post by:
Hi All, I encountered a funny thing, and my code schetch as below: #define READ 0 #define WRITE 1 int byteRead, status, pd; char buff;
1
by: Doug Wyatt | last post by:
So I'll preface this with the fact that I'm a UNIX developer by training and have just recently gotten in to C# development on Windows. I'm basically running in to a problem whereby I suspect...
12
by: Yarco | last post by:
when doing fork in a loop: while(1) { tmp_sd = accept(sd, (struct sockaddr*)&tmp_sin, &len); if (tmp_sd == -1) { perror("accept"); exit(0); } //check client ip
59
by: Jeff Bowden | last post by:
For ease of configuration and other reasons, I would like for my single-user GUI app to be able to use postgresql in-process as a library accessing a database created in the users home directory. ...
2
by: ramasubramanian.rahul | last post by:
i am trying to implement the unix command ls -l | wc -l in c...( using pipes and excev) its not working.... can anyone help me here ??? thanks in advance rahul #include<stdio.h> 2 #include...
13
by: Vincent Delporte | last post by:
Hi I'm a Python newbie, and would like to rewrite this Perl scrip to be run with the Asterisk PBX: http://www.voip-info.org/wiki/view/Asterisk+NetCID Anyone knows if those lines are...
0
by: maheshnew2007 | last post by:
Hi, I have simple Ant's build.xml file, which contains fork="yes". build.xml file: <?xml version="1.0"?> <project name="test" default="compile" basedir="."> <property name="src"...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.