Board.KolibriOS.org

Official KolibriOS board
It is currently Sat May 25, 2019 5:10 pm

All times are UTC+03:00




Post new topic  Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Fork Exec
PostPosted: Tue Jun 16, 2009 6:05 pm 
Offline

Joined: Tue Jun 16, 2009 5:49 pm
Posts: 3
it's really tough for me surf through your russian forum! wouldn't english be much more "international"?!

btw, i'd like to know whether KolibriOS provides functions like fork() vfork() tcsetpgrp() exec() get/setpgid() kill() or signal() as Unix does and if so, how have been named.

thx in advance


Top
   
 Post subject: Re: Fork Exec
PostPosted: Wed Jun 17, 2009 7:40 pm 
Offline
Kernel Developer
User avatar

Joined: Mon Nov 28, 2005 8:00 pm
Posts: 1601
We have english subforum here.
Kolibri is not POSIX compatible. There is no standard library; all interaction of programs with the system goes through system calls, which are identified not by name, but by number.
All of these functions are not supported;however, there are system functions for creating new process (70.7) and for creating new thread in the current process (51) instead of fork()/vfork()/exec*().


Top
   
 Post subject: Re: Fork Exec
PostPosted: Wed Jun 17, 2009 7:55 pm 
Offline

Joined: Tue Jun 16, 2009 5:49 pm
Posts: 3
What if I call 70.7 from a running process? May I call it from a running process to fork into another? Does 70.7 works somehow similarly fork()?
Does KolibriOS manage memory by paging or how?


Top
   
 Post subject: Re: Fork Exec
PostPosted: Wed Jun 17, 2009 7:59 pm 
Offline
Kernel Developer
User avatar

Joined: Mon Nov 28, 2005 8:00 pm
Posts: 1601
The process continues running, and new process based on selected executable is created (and has no common with parent process, except for command line which can be passed from parent to child). Forking is not supported.
Yes, paging memory model is used.


Top
   
 Post subject: Re: Fork Exec
PostPosted: Wed Jun 17, 2009 8:58 pm 
Offline

Joined: Tue Jun 16, 2009 5:49 pm
Posts: 3
And how are file descriptors handled?


Top
   
 Post subject: Re: Fork Exec
PostPosted: Wed Jun 17, 2009 9:44 pm 
Offline
Kernel Developer
User avatar

Joined: Mon Nov 28, 2005 8:00 pm
Posts: 1601
File descriptors are not directly supported by the kernel, but can be emulated (with some differences, e.g. no sharing restrictions). At the level of system calls there is function 70, which does all operations with files by file names. A wrapper for open() can allocate an internal structure with file name and return pointer to it as a handle, and a wrapper for read()/write() can use saved file name to call function 70. close() can simply free the pointer.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 6 posts ] 

All times are UTC+03:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited