- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: language and scripting
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-12-2010 02:07 AM
тАО07-12-2010 02:07 AM
language and scripting
this time for the multiprocessing
in c we write
int main()
{
int pid=fork();
if(pid<0)
{
printf("error");
exit(-1);
}
else if(pid==0)
{
.....
}
else
{
wait(NULL);/* wait for child to complete*/
exit(0);
}
here how karnel can understand that the parent
process waiting for it's child to complete
plese reply
- Tags:
- fork
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-12-2010 10:21 AM
тАО07-12-2010 10:21 AM
Re: language and scripting
and returns the pid of the child in the parent process.
So if pid!=0 it means that we are executed in the parent process.
then wait() check if child process are zombies, else wait for the next child process dying. When a child process die it wakes up the parent process.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-12-2010 08:39 PM
тАО07-12-2010 08:39 PM
Re: language and scripting
how I can adopt with HPUX very quickly
learn the basic unix commands and the shell programing
it will help me a lot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-12-2010 10:44 PM - edited тАО07-09-2011 04:12 PM
тАО07-12-2010 10:44 PM - edited тАО07-09-2011 04:12 PM
Re: question on fork
(It would be more helpful if you used a subject that included your question and not the name of the forum.)
>how I can adopt with HP-UX very quickly
>learn the basic Unix commands and the shell programming
If you know the command, fork, you can use man to look it up. Unfortunately there isn't an example there.
You could just search the web for: C fork examples
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-12-2010 10:45 PM
тАО07-12-2010 10:45 PM
Re: language and scripting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-09-2010 01:17 AM - edited тАО07-09-2011 04:13 PM
тАО11-09-2010 01:17 AM - edited тАО07-09-2011 04:13 PM
Re: question on fork
>thank you sir
If you are happy with the answers you were given, please read the following on how to assign points:
http://forums.itrc.hp.com/service/forums/helptips.do?#33
Your unassigned points:
http://forums.itrc.hp.com/service/forums/pageList.do?userId=WW459660&listType=unassigned
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-09-2010 03:24 AM
тАО11-09-2010 03:24 AM
Re: language and scripting
> learn the basic unix commands and the shell programing
A good quick look at using various shells can be found here:
http://docs.hp.com/en/B2355-90046/index.html
Regards!
...JRF...