With little understanding of fork basics here are few more findings on how to vfork implementation in windows operating system and
fork implementation on win32
AT&T Labs Research - Software Tools pick out UWIN: Unix on Windows 95 and NT Machines
Major difference in Linux/Unix functionality and WIN32 applications
Process control and management:
Fork implementation
processes can be created using the fork(2) function, in win32 includes a spawn family of functions that combines the functionality of fork/exec for efficiency.
File descriptor
Open files, pipes, sockets, fifos, and character and block special devices files have file descriptors associated with them. In windows it is called handle.
signals
Most of the unix/linux signals are absent in windows, like SIGALRM
SIGCHLD
SIGHUP
SIGINT
SIGKILL
SIGPIPE
SIGQUIT
SIGUSR1
SIGUSR2
these can be implemented using replacement methods like SIGALRM Time-out alarm can be implemented using SetTimer – WM_TIMER – CreateWaitableTimer
SIGCHLD Change in status of child can be implemented using WaitForSingleObject
Terminal interface for consoles, sockets, and serial lines
sockets based on WINSOCK:
File control locking:
Memory mapping and shared memory
mmap()
System V IPC
semaphore; Shmget can be implemented using CreateFileMaping or
OpenFileMapping
shmdt can be implemented using UnmapViewOfFile
shmat can be implemented using MapViewOfFile
Pipe to _pipe
Close to _close
Runtime linking of dynamically linked libraries : like The dlopen(), dlsym() interface
Error mapping from Windows to UNIX
Symbolic links
Symbolic links to files and directories can be created and can be implemented as Windows shortcuts.
Few Good References for Unix2Win porting
- Porting Socket Applications to Winsock
- Process and Thread Functions
- Winsock Programmer’s FAQ Articles: BSD Sockets Compatibility
- LibGW32C for GNU C library for Windows
- Unix to Windows Porting Dictionary for HPC
- UNIX Application Migration Guide
number of view: 19
Possibly Related Posts:
Windows errors are strange,
I have one header file in which one structure is declared,
as
typedef struct {
key_t xyz;
——
}INFO;
For this When I compile using cl.exe I get following list of errors.
: error C2016: C requires that a struct or union has at least one member
: error C2061: syntax error : identifier 'key_t'
: error C2059: syntax error : '}'
Well I am doing Code migration from Unix system to Windows system so key_t is not known in windows.
It does not make sense for the
which says no closing single quotation mark. Scratching my head and going around with the error.
I do not see any mistake in struct declaration,
Solution – C requires that a struct or union has at least one member
Just add the declaration of key_t in same header file before structure declaration.
typedef int key_t;
And compile again you are done.
number of view: 25
Possibly Related Posts:
Emulate the fortran function btest in C language
BTEST function is as part of Bit Functions library in Fortran,
description of BTEST function
btest( m, i ) Tests bit i in m; returns .true. if the bit is 1, and .false. if it is 0.
Here is C language code implementation of BTEST function, which checks for bit and returns true ie 1 if bit is SET or else returns 0.
int btest(int word, int bit)
{
unsigned int mask;
/* Create the bit mask */
mask = 0x0000001 << bit;
/* Return TRUE or FALSE*/
return (( word & mask ) != 0);
}
number of view: 13
Possibly Related Posts:
BD polytechnic admission test results online
 |
DIRECTORATE OF TECHNICAL EDUCATION |
 |
 |
DIRECTORATE OF TECHNICAL EDUCATION declared Polytechnic Admission Test Result Bangladesh online at www.techedu.gov.bd
Contact
Directorate of Technical Education
F-4/B Agargaon Administrative Area,
Sher-e Bangla Nagar, Dhaka-1207
Ph: 88-02-9110664
www.educationboardresults.gov.bd HSC Result 2010 Bangladesh Dhaka HSC 2010 results -
BD polytechnic admission test results now online
watch your admission results and news.
this link
clicking this direct link
admission in polytechinc bd online, Admission into Polytechnic Institute, bd polytechnic admission results, bd polytechnic admission results online
number of view: 99
Possibly Related Posts:
Error: This USE statement is not positioned correctly within the scoping unit.
I keep getting this error, and I have no idea why. The program is in a very standard structure:
I did check help / man page of IFORT but no luck..
This thread at intel.com also discuss about the same problem.
the answer at this thread is
“USE YourModule” must preceed local variable declarations. Your include file (at least one of your include files) is declaring at least one variable.
Place your USE to preceed the include statements.
But that did not work completely,
and other half part of answer is
Add an only clause to select only the GETENV routine:
use IFPORT, only: GETENV
This will hide any other names in IFPORT;
This post will talk about why added USE IFPORT
This worked fine..
share your experience as well..
USE also must precede any IMPLICIT statements. Best is to have them come directly after the SUBROUTINE or FUNCTION statement.
you can have USE and IMPORT statements in the same interface body, but the forbidden ‘mixing’ I was referring to was that of placing any IMPORT statement before any USE statement .. source
number of view: 11
Possibly Related Posts:
Pipe is a buffer of fixed size written by one related process and read by another related process. where related process means, parent and child process.
Usage : int pipe(int fildes[2])
creates a pipe and returns two file descriptors, fildes[0] and fildes[1] for reading and writing.
mutual exclusion is handled by operating system, ie only one process at a time can read or write to pipe. If one process is reading or writing on pipe other process will wait.
processes sharing the pipe must have same parent in common and are unaware of each other’s existence
Pipe example
main()
{
int n;
int pipefd[2];
char buff[100];
if (pipe(pipefd) < 0) // create a pipe
perror(“pipe error”);
printf(“read fd = %d, writefd = %d\n”, pipefd[0], pipefd[1]);
if (write(pipefd[1], “hello world\n”, 12) !=12) // write to pipe
perror(“write error”);
if ((n=read(pipefd[0], buff, sizeof(buff))) <=0) //read from pipe
perror(“read error”);
write(1, buff, n ); /* write to stdout */
close(pipefd[0]);
close(pipefd[1]);
exit(0);
}
Result:
read fd = 3, writefd = 4
hello world
default FD for any process under Linux is from 0, 1 and 2 ie for STDIN, STDOUT and STRERR, whatever new descriptors are created will be assigned FD greater than 2. So read FD for pipe is 3 and write FD for Pipe is 4.
number of view: 14
Possibly Related Posts:
The Cameroon GCE 2010 board result Updates from The Cameroon General Certificate of Education Board .
Update from Cameroon GCE Board results that this year’s General Certificate of Education results will be out by mid August 2010.
written part of the 2010 GCE Examination,
Q. When will the results for cameroon GCE 2010 be released?
A. The site is not mentioned anywhere, may be announced at
http://www.camgceb.org/
results for the 2010 g c e in cameroon, cameroon gce 2010 results,
cameroon gce 2009 results,cameroon gcse results day 2010,
GCE Results To Be Released Before Mid August.
cameroon gce board • gce board • cameroon news headlines • gce board cameroon • cameroon gce results 2010
cameroon GCE2009 Examinations results.list of 2010 Cameroon GCE result. EXAM RESULTS: JUNE 2010 CAMEROON GCE RESULTS .
cameron gce board result2010. Cameroon gce 2010 results. cameroon certificate of education broad.
CAMEROON G C E results list 2010
cameroon post or GCE advanced level results.
number of view: 108
Possibly Related Posts:
NIPER JEE Results | Admisson to M.S. Pharm. M.Pharm. M.Tech Pharm. M.B.A. Pharm,

Here is update on NIPER JOINT ENTRANCE EXAMINATION 2010 (NIPER-JEE 2010)
NIPER JEE Results 2010 will be declared today ie
Declaration of result of NIPER JEE-2010 is 16th July 2010.
NIPER entrance Results 2010 | NIPER,
check out NIPER counselling and admission details online.
NIPER Joint Entrance Examination – 2010 (NIPER-JEE-2010) For Admisson to M.S. (Pharm.); M.Pharm.; M.Tech. (Pharm.); M.B.A. (Pharm.)
http://www.niper.ac.in/niperjee2010.html
NIPER JEE Results, NIPER JEE Results 2010, NIPER JEE Results online, NIPER List of Selected Candidates, NIPER MBA admission Results, NIPER MBA Entrance
First NIPER counselling will begin from 23rd July 2010,
NIPER JEE Results, NIPER JEE Results 2010, NIPER JEE Results online, NIPER List of Selected Candidates, NIPER MBA admission Results, NIPER MBA Entrance Results, NIPER MErit List, NIPER MPharm Results, NIPER MS Entrance results, NIPER MTech Results, NIPER Selected Candidates List, www.niper.ac.in
number of view: 187
Possibly Related Posts:
Result of SSC (10th) Annual 2010 will be annouced on 4th Aug 2010 at 10:00 am
This is also called SSC (PART II) ANNUAL EXAMINATION, 2010 RESULT of pakistan board.
Result of SSC (9th) Annual 2010 will be annouced on 25th Aug 2010 at 10:00 am
This results are also called, SSC (PART I) ANNUAL EXAMINATION, 2010 RESULT of pakistan board.
Also check out
Federal Board of Intermediate and Secondary Education, Islamabad
http://www.fbise.edu.pk/
Lahore Board
To Check SSC Results for Lahore Board http://www.biselahore.com/
Tel: +92-42-9200192-7
Fax: +92-42-9200113
Karachi Board of Secondary Education (SSC)
Website: http://www.bsek.edu.pk/
Tel: 021-6610065
Hayderabad Board
To Check HSSC Results for Hayderabad Board : http://www.bisehyd.edu.pk/
Tel: 0221-9260277-78-79-81-82
Rawalpindi Board:
To view SSC and HSSC Results for Rawalpindi Board online:
http://www.biserwp.edu.pk/Result.asp
Tel: (92) 51-9290529
Fax: (92) 51-9290552
Lahore Board
To Check SSC Results for Lahore Board http://www.biselahore.com/
Tel: +92-42-9200192-7
Fax: +92-42-9200113
Faisalabad Board
To Check SSC Results for Faisalabad Board http://www.bisefsd.edu.pk/Result.aspx
Tel. 042-9200677, 042-9200836
Fax. 042-9200679
Multan Board:
To Check SSC Results for Multan Board : http://www.bisemultan.edu.pk/
Phone No: 061-9210029
Fax No: 061-9210012
Gujranwala Board
To Check SSC Results for Gujranwala Board: http://www.bisegrw.com/
Tel: 092-55- 9200751 to 56 Ext: 801 and 802
Bhawalpur Boarrd:
To Check SSC Results for Bhawalpur Board : http://www.bisebwp.edu.pk/result.htm
Sukkur Board
To Check SSC Results for Sukkur Board : http://www.bisesuksindh.edu.pk/
Tel: 071-9310620
Sargodha Board
To Check SSC Results for Sargodha Board http://www.bisesargodha.edu.pk/
Tel: 048-9230143 / 048-3213632
Fax: 048-9230144
number of view: 1648
Possibly Related Posts:
Popular Discussion Here