Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 06-18-2009, 09:02 PM   #1
Registered: Mar 2009
Posts: 82

Rep: Reputation: 16
Replacement for <unistd.h>, <sys/wait.h> and <signal.h> in Windows ?

Hello everyone,

I am converting a Linux app to Windows with Visual Studio 2005 ( Win32 console app).

Basically I need counterparts of fork(), signalset functions under Windows. <csignal> is a said to be a replacement for <signal.h> according to MSDN (I haven't confirmed it yet).

Does anyone have some idea on replacement of <sys/wait.h> and <unistd.h> ?

Do they have a completed alternative header files or need to be specific on functions ?


Old 06-18-2009, 09:12 PM   #2
LQ Guru
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Which headers you need depends largely on which functions you're using. It's conceivable, for example, that all you might need is "<windows.h>".

MSDN is a joy to use: just highlight a function in the Visual Studio IDE, hit <F1> ... and it's usually pretty good about bringing up the man page, telling you what header and/or library you need, and discussing any compatibility issues.

If the function in question doesn't show up on MSDN (i.e. if that particular API isn't supported under Windows), then Google is your next stop. You're virtually certain to find a Windows equivalent!

'Hope that helps .. PSM
Old 06-19-2009, 07:18 AM   #3
LQ Guru
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 9,078
Blog Entries: 4

Rep: Reputation: 3169Reputation: 3169Reputation: 3169Reputation: 3169Reputation: 3169Reputation: 3169Reputation: 3169Reputation: 3169Reputation: 3169Reputation: 3169Reputation: 3169
I'd suggest spending some "google time" looking over your various options. There are many ways to do cross-platform code and/or cross-platform conversions, so if you find yourself "thinking from scratch," it's time to pull-back and look around: your efforts would be redundant.
Actum Ne Agas: "Do Not Do A Thing Already Done."
Look over the code and try to enumerate the Linux/Unix facilities that are being used in the code, how they are being used (particularly if threading and/or synchronization is involved), and so on ... all before you embark upon changing anything at all. Then, do your research.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the packet for unistd.h sys/types.h ? spank Linux - Newbie 3 03-03-2007 11:32 AM
LXer: Why you shouldn't wait for the perfect open source Windows-apps replacement LXer Syndicated Linux News 0 04-22-2006 07:21 PM
Is a Linux sys w/o any passwd's as secure as a microsoft windows sys w/no passwd? t3gah Linux - Security 4 04-22-2005 08:01 PM
wait() and signal() applies on which process ...? indian Programming 5 12-01-2004 02:43 PM
pthread , signal/wait ldamian Programming 3 07-31-2003 05:49 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:43 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration