Fork Exec

Kernel architecture questions
  • 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*().
  • 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?
  • 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.
  • And how are file descriptors handled?
  • 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.
  • Who is online

    Users browsing this forum: No registered users and 4 guests