From: Valdis.Kletnieks@vt.edu (Valdis.Kletnieks at vt.edu)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Change proc/<pid>/cmdline to 8k
Date: Thu, 04 Jun 2015 18:19:06 -0400 [thread overview]
Message-ID: <95183.1433456346@turing-police.cc.vt.edu> (raw)
In-Reply-To: Your message of "Thu, 04 Jun 2015 21:06:10 +0530." <CAA=4085a+TfEwBtBwsn5tdX6sMLRVZwH45h2RP_WQCVHzs3U1A@mail.gmail.com>
On Thu, 04 Jun 2015 21:06:10 +0530, Navin P said:
> have this 3rd party application with deeply mounted dir that runs as a
> testcase more than 5k chars . We can change it , i thought if that was
> the problem ?
So why is a long commandline a problem that needs solving? Are you actually
caring what the command line says? If so, why?
Hint: There's no guarantee that your commandline contain the actual full
command string. Consider this on an x86_84 kernel (yes, my $HOME does
need a good cleaning))
% /bin/echo * | wc
1 1884 25797
1,884 parameters in argv[], totalling some 24K of data. Which means that
20k isn't displayable. And extending it to 64k won't fix the problem, as
demonstrated by looking at a rather large mail folder I have:
% /bin/echo ietf/* | wc
1 62257 673721
OK, how far can we take this?
% echo | xargs --show-limits echo
Your environment variables take up 1918 bytes
POSIX upper limit on argument length (this system): 2093186
POSIX smallest allowable upper limit on argument length (all systems): 4096
Maximum length of command we could actually use: 2091268
Size of command buffer we are actually using: 131072
Apparently, up to 2M or so...
So what problem are you trying to solve, and why?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150604/2332681d/attachment.bin
next prev parent reply other threads:[~2015-06-04 22:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-04 4:22 Change proc/<pid>/cmdline to 8k Navin P
2015-06-04 5:17 ` Greg KH
2015-06-04 7:41 ` Navin P
2015-06-04 8:04 ` Greg KH
2015-06-04 15:36 ` Navin P
2015-06-04 22:07 ` Greg KH
2015-06-04 22:18 ` Valdis.Kletnieks at vt.edu
2015-06-04 22:38 ` Greg KH
2015-06-04 22:19 ` Valdis.Kletnieks at vt.edu [this message]
2015-06-05 3:21 ` Navin P
2015-06-16 10:34 ` Navin P
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=95183.1433456346@turing-police.cc.vt.edu \
--to=valdis.kletnieks@vt.edu \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).