Allow a parent to set up a child's fd's via a new system call
[akaros.git] / kern / src / process.c
index 19efc07..1857c04 100644 (file)
@@ -389,9 +389,9 @@ error_t proc_alloc(struct proc **pp, struct proc *parent, int flags)
                        clone_files(&parent->open_files, &p->open_files);
        } else {
                /* no parent, we're created from the kernel */
-               assert(insert_file(&p->open_files, dev_stdin,  0) == 0);
-               assert(insert_file(&p->open_files, dev_stdout, 0) == 1);
-               assert(insert_file(&p->open_files, dev_stderr, 0) == 2);
+               assert(insert_file(&p->open_files, dev_stdin,  0, 0) == 0);
+               assert(insert_file(&p->open_files, dev_stdout, 1, 0) == 1);
+               assert(insert_file(&p->open_files, dev_stderr, 2, 0) == 2);
        }
        /* Init the ucq hash lock */
        p->ucq_hashlock = (struct hashlock*)&p->ucq_hl_noref;