Fork giving error

Fernando Gleiser fgleiser at
Wed Jun 11 09:27:47 PDT 2003

On Wed, 11 Jun 2003, Sharma, Tarun wrote:

> while running a program I found that fork was giving some error. Can anybody
> tell me why fork can give error and whats the solution for not getting this
> problem ?

If any syscall fails, you should look at errno(2) to see why it failed.

In the fork case, it fails because either there is no memory for the
new process (ENOMEM) or you've reached the maximum number of processes
(EAGAIN). But we can't tell why it fails without looking at the actual


More information about the freebsd-questions mailing list