Board.KolibriOS.org
http://board.kolibrios.org/

Fork Exec
http://board.kolibrios.org/viewtopic.php?f=35&t=1291
Page 1 of 1

Author:  zPlus [ Tue Jun 16, 2009 6:05 pm ]
Post subject:  Fork Exec

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

Author:  diamond [ Wed Jun 17, 2009 7:40 pm ]
Post subject:  Re: Fork Exec

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*().

Author:  zPlus [ Wed Jun 17, 2009 7:55 pm ]
Post subject:  Re: Fork Exec

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?

Author:  diamond [ Wed Jun 17, 2009 7:59 pm ]
Post subject:  Re: Fork Exec

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.

Author:  zPlus [ Wed Jun 17, 2009 8:58 pm ]
Post subject:  Re: Fork Exec

And how are file descriptors handled?

Author:  diamond [ Wed Jun 17, 2009 9:44 pm ]
Post subject:  Re: Fork Exec

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.

Page 1 of 1 All times are UTC+03:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/