Argument list too long: /bin/sh on Linux redhat
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I am having a script named as test.sh, which I use to run as below, which works fine:-
/root/test.sh
Then i tried to compile this script using the shc compiler as below with Warning:-
shc -v -r -T -f test.sh
shc: WARNING!!
Scripts of length near to (or higher than) the current System limit on
"maximum size of arguments to EXEC", could comprise its binary execution.
In the current System the call sysconf(_SC_ARG_MAX) returns -1 bytes
and your script "test.sh" is 155201 bytes length.
shc shll=sh
shc [-i]=-c
shc [-x]=exec '%s' "$@"
shc [-l]=
shc opts=
shc: cc test.sh.x.c -o test.sh.x
shc: strip test.sh.x
shc: chmod go-r test.sh.x
as a result of this warning i am not able to run this compiled file:-
./test.sh.x
./test.sh.x: Argument list too long: /bin/sh
can anyone help me out to fix this issue? How can i increase the limit of _SC_ARG_MAX so that i can compile the scripts.
thanks to help me on this.
Best Regards,
JAS
linux shell-script rhel compiler
add a comment |Â
up vote
0
down vote
favorite
I am having a script named as test.sh, which I use to run as below, which works fine:-
/root/test.sh
Then i tried to compile this script using the shc compiler as below with Warning:-
shc -v -r -T -f test.sh
shc: WARNING!!
Scripts of length near to (or higher than) the current System limit on
"maximum size of arguments to EXEC", could comprise its binary execution.
In the current System the call sysconf(_SC_ARG_MAX) returns -1 bytes
and your script "test.sh" is 155201 bytes length.
shc shll=sh
shc [-i]=-c
shc [-x]=exec '%s' "$@"
shc [-l]=
shc opts=
shc: cc test.sh.x.c -o test.sh.x
shc: strip test.sh.x
shc: chmod go-r test.sh.x
as a result of this warning i am not able to run this compiled file:-
./test.sh.x
./test.sh.x: Argument list too long: /bin/sh
can anyone help me out to fix this issue? How can i increase the limit of _SC_ARG_MAX so that i can compile the scripts.
thanks to help me on this.
Best Regards,
JAS
linux shell-script rhel compiler
As you can see: 1) It's a warning, not an error, and 2) the value -1 for the current_SC_ARG_MAX
is nonsensical. Also 3) You would have to change the limit in one of the system header files and recompile everything that uses that header.
â Kusalananda
Sep 25 '17 at 16:00
The -1 thing I alluded to above means no matter what you increase_SC_ARG_MAX
to, it would likely still complain as it doesn't seem to read the value correctly.
â Kusalananda
Sep 25 '17 at 16:56
sysconf(3)
returns -1 only in case of an error._SC_ARG_MAX
is required by POSIX, so you're looking at a bug either inshc
or in yourlibc
.
â Satà  Katsura
Sep 25 '17 at 17:07
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am having a script named as test.sh, which I use to run as below, which works fine:-
/root/test.sh
Then i tried to compile this script using the shc compiler as below with Warning:-
shc -v -r -T -f test.sh
shc: WARNING!!
Scripts of length near to (or higher than) the current System limit on
"maximum size of arguments to EXEC", could comprise its binary execution.
In the current System the call sysconf(_SC_ARG_MAX) returns -1 bytes
and your script "test.sh" is 155201 bytes length.
shc shll=sh
shc [-i]=-c
shc [-x]=exec '%s' "$@"
shc [-l]=
shc opts=
shc: cc test.sh.x.c -o test.sh.x
shc: strip test.sh.x
shc: chmod go-r test.sh.x
as a result of this warning i am not able to run this compiled file:-
./test.sh.x
./test.sh.x: Argument list too long: /bin/sh
can anyone help me out to fix this issue? How can i increase the limit of _SC_ARG_MAX so that i can compile the scripts.
thanks to help me on this.
Best Regards,
JAS
linux shell-script rhel compiler
I am having a script named as test.sh, which I use to run as below, which works fine:-
/root/test.sh
Then i tried to compile this script using the shc compiler as below with Warning:-
shc -v -r -T -f test.sh
shc: WARNING!!
Scripts of length near to (or higher than) the current System limit on
"maximum size of arguments to EXEC", could comprise its binary execution.
In the current System the call sysconf(_SC_ARG_MAX) returns -1 bytes
and your script "test.sh" is 155201 bytes length.
shc shll=sh
shc [-i]=-c
shc [-x]=exec '%s' "$@"
shc [-l]=
shc opts=
shc: cc test.sh.x.c -o test.sh.x
shc: strip test.sh.x
shc: chmod go-r test.sh.x
as a result of this warning i am not able to run this compiled file:-
./test.sh.x
./test.sh.x: Argument list too long: /bin/sh
can anyone help me out to fix this issue? How can i increase the limit of _SC_ARG_MAX so that i can compile the scripts.
thanks to help me on this.
Best Regards,
JAS
linux shell-script rhel compiler
linux shell-script rhel compiler
asked Sep 25 '17 at 15:55
jassi10781
112
112
As you can see: 1) It's a warning, not an error, and 2) the value -1 for the current_SC_ARG_MAX
is nonsensical. Also 3) You would have to change the limit in one of the system header files and recompile everything that uses that header.
â Kusalananda
Sep 25 '17 at 16:00
The -1 thing I alluded to above means no matter what you increase_SC_ARG_MAX
to, it would likely still complain as it doesn't seem to read the value correctly.
â Kusalananda
Sep 25 '17 at 16:56
sysconf(3)
returns -1 only in case of an error._SC_ARG_MAX
is required by POSIX, so you're looking at a bug either inshc
or in yourlibc
.
â Satà  Katsura
Sep 25 '17 at 17:07
add a comment |Â
As you can see: 1) It's a warning, not an error, and 2) the value -1 for the current_SC_ARG_MAX
is nonsensical. Also 3) You would have to change the limit in one of the system header files and recompile everything that uses that header.
â Kusalananda
Sep 25 '17 at 16:00
The -1 thing I alluded to above means no matter what you increase_SC_ARG_MAX
to, it would likely still complain as it doesn't seem to read the value correctly.
â Kusalananda
Sep 25 '17 at 16:56
sysconf(3)
returns -1 only in case of an error._SC_ARG_MAX
is required by POSIX, so you're looking at a bug either inshc
or in yourlibc
.
â Satà  Katsura
Sep 25 '17 at 17:07
As you can see: 1) It's a warning, not an error, and 2) the value -1 for the current
_SC_ARG_MAX
is nonsensical. Also 3) You would have to change the limit in one of the system header files and recompile everything that uses that header.â Kusalananda
Sep 25 '17 at 16:00
As you can see: 1) It's a warning, not an error, and 2) the value -1 for the current
_SC_ARG_MAX
is nonsensical. Also 3) You would have to change the limit in one of the system header files and recompile everything that uses that header.â Kusalananda
Sep 25 '17 at 16:00
The -1 thing I alluded to above means no matter what you increase
_SC_ARG_MAX
to, it would likely still complain as it doesn't seem to read the value correctly.â Kusalananda
Sep 25 '17 at 16:56
The -1 thing I alluded to above means no matter what you increase
_SC_ARG_MAX
to, it would likely still complain as it doesn't seem to read the value correctly.â Kusalananda
Sep 25 '17 at 16:56
sysconf(3)
returns -1 only in case of an error. _SC_ARG_MAX
is required by POSIX, so you're looking at a bug either in shc
or in your libc
.â Satà  Katsura
Sep 25 '17 at 17:07
sysconf(3)
returns -1 only in case of an error. _SC_ARG_MAX
is required by POSIX, so you're looking at a bug either in shc
or in your libc
.â Satà  Katsura
Sep 25 '17 at 17:07
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
The program that you are using is not reading _SC_ARG_MAX
correctly and reports it as -1
.
This means that even if you tried to increase this value (which would include fiddling in the system header files and recompiling at least the kernel and a few utilities), it would probably still not read the correct value.
The message is a warning, which means that it's not fatal. It is likely that whatever operation the utility preformed went ok.
The system configuration variable ARG_MAX
(which has the value of the symbolic constant _SC_ARG_MAX
) has the value 2097152 on Ubuntu and 262144 on OpenBSD (getconf ARG_MAX
). Your value, 155201, is well within those.
I don't have access to a RedHat machine to see what this value may be there.
1
RHEL 6.7:ARG_MAX
= 2621440, RHEL 7.4:ARG_MAX
= 2097152.
â Christopher
Sep 25 '17 at 17:14
I am on Red Hat Enterprise Linux Server release 6.6 Current Value in limit.h is as below:-#define ARG_MAX 131072 /* # bytes of args + environ for exec() */
â jassi10781
Sep 26 '17 at 4:30
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
The program that you are using is not reading _SC_ARG_MAX
correctly and reports it as -1
.
This means that even if you tried to increase this value (which would include fiddling in the system header files and recompiling at least the kernel and a few utilities), it would probably still not read the correct value.
The message is a warning, which means that it's not fatal. It is likely that whatever operation the utility preformed went ok.
The system configuration variable ARG_MAX
(which has the value of the symbolic constant _SC_ARG_MAX
) has the value 2097152 on Ubuntu and 262144 on OpenBSD (getconf ARG_MAX
). Your value, 155201, is well within those.
I don't have access to a RedHat machine to see what this value may be there.
1
RHEL 6.7:ARG_MAX
= 2621440, RHEL 7.4:ARG_MAX
= 2097152.
â Christopher
Sep 25 '17 at 17:14
I am on Red Hat Enterprise Linux Server release 6.6 Current Value in limit.h is as below:-#define ARG_MAX 131072 /* # bytes of args + environ for exec() */
â jassi10781
Sep 26 '17 at 4:30
add a comment |Â
up vote
0
down vote
The program that you are using is not reading _SC_ARG_MAX
correctly and reports it as -1
.
This means that even if you tried to increase this value (which would include fiddling in the system header files and recompiling at least the kernel and a few utilities), it would probably still not read the correct value.
The message is a warning, which means that it's not fatal. It is likely that whatever operation the utility preformed went ok.
The system configuration variable ARG_MAX
(which has the value of the symbolic constant _SC_ARG_MAX
) has the value 2097152 on Ubuntu and 262144 on OpenBSD (getconf ARG_MAX
). Your value, 155201, is well within those.
I don't have access to a RedHat machine to see what this value may be there.
1
RHEL 6.7:ARG_MAX
= 2621440, RHEL 7.4:ARG_MAX
= 2097152.
â Christopher
Sep 25 '17 at 17:14
I am on Red Hat Enterprise Linux Server release 6.6 Current Value in limit.h is as below:-#define ARG_MAX 131072 /* # bytes of args + environ for exec() */
â jassi10781
Sep 26 '17 at 4:30
add a comment |Â
up vote
0
down vote
up vote
0
down vote
The program that you are using is not reading _SC_ARG_MAX
correctly and reports it as -1
.
This means that even if you tried to increase this value (which would include fiddling in the system header files and recompiling at least the kernel and a few utilities), it would probably still not read the correct value.
The message is a warning, which means that it's not fatal. It is likely that whatever operation the utility preformed went ok.
The system configuration variable ARG_MAX
(which has the value of the symbolic constant _SC_ARG_MAX
) has the value 2097152 on Ubuntu and 262144 on OpenBSD (getconf ARG_MAX
). Your value, 155201, is well within those.
I don't have access to a RedHat machine to see what this value may be there.
The program that you are using is not reading _SC_ARG_MAX
correctly and reports it as -1
.
This means that even if you tried to increase this value (which would include fiddling in the system header files and recompiling at least the kernel and a few utilities), it would probably still not read the correct value.
The message is a warning, which means that it's not fatal. It is likely that whatever operation the utility preformed went ok.
The system configuration variable ARG_MAX
(which has the value of the symbolic constant _SC_ARG_MAX
) has the value 2097152 on Ubuntu and 262144 on OpenBSD (getconf ARG_MAX
). Your value, 155201, is well within those.
I don't have access to a RedHat machine to see what this value may be there.
answered Sep 25 '17 at 17:02
Kusalananda
106k14209327
106k14209327
1
RHEL 6.7:ARG_MAX
= 2621440, RHEL 7.4:ARG_MAX
= 2097152.
â Christopher
Sep 25 '17 at 17:14
I am on Red Hat Enterprise Linux Server release 6.6 Current Value in limit.h is as below:-#define ARG_MAX 131072 /* # bytes of args + environ for exec() */
â jassi10781
Sep 26 '17 at 4:30
add a comment |Â
1
RHEL 6.7:ARG_MAX
= 2621440, RHEL 7.4:ARG_MAX
= 2097152.
â Christopher
Sep 25 '17 at 17:14
I am on Red Hat Enterprise Linux Server release 6.6 Current Value in limit.h is as below:-#define ARG_MAX 131072 /* # bytes of args + environ for exec() */
â jassi10781
Sep 26 '17 at 4:30
1
1
RHEL 6.7:
ARG_MAX
= 2621440, RHEL 7.4: ARG_MAX
= 2097152.â Christopher
Sep 25 '17 at 17:14
RHEL 6.7:
ARG_MAX
= 2621440, RHEL 7.4: ARG_MAX
= 2097152.â Christopher
Sep 25 '17 at 17:14
I am on Red Hat Enterprise Linux Server release 6.6 Current Value in limit.h is as below:-
#define ARG_MAX 131072 /* # bytes of args + environ for exec() */
â jassi10781
Sep 26 '17 at 4:30
I am on Red Hat Enterprise Linux Server release 6.6 Current Value in limit.h is as below:-
#define ARG_MAX 131072 /* # bytes of args + environ for exec() */
â jassi10781
Sep 26 '17 at 4:30
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f394342%2fargument-list-too-long-bin-sh-on-linux-redhat%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
As you can see: 1) It's a warning, not an error, and 2) the value -1 for the current
_SC_ARG_MAX
is nonsensical. Also 3) You would have to change the limit in one of the system header files and recompile everything that uses that header.â Kusalananda
Sep 25 '17 at 16:00
The -1 thing I alluded to above means no matter what you increase
_SC_ARG_MAX
to, it would likely still complain as it doesn't seem to read the value correctly.â Kusalananda
Sep 25 '17 at 16:56
sysconf(3)
returns -1 only in case of an error._SC_ARG_MAX
is required by POSIX, so you're looking at a bug either inshc
or in yourlibc
.â Satà  Katsura
Sep 25 '17 at 17:07