Re: maximum length of process command stored in unix

From: Casper H.S. Dik (Casper.Dik_at_Sun.COM)
Date: 04/04/05


Date: 04 Apr 2005 21:26:49 GMT

kamalp@acm.org (Kamal R. Prasad) writes:

>When you execute a command, execve() syscall results in cmdline being
>copied from userspace to kernel in a buffer of size 2048 bytes and not
>80 bytes. struct proc -may or may not truncate the p_comm(or cmdline)
>to less than LINE_MAX(2048 bytes).

2 Megabyte, not 2K.

Casper

-- 
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.