07-25-2007
error "Invalid argument" returned after call sched_setscheduler
the code is below and the was run on Solaris 9.
-----------------------------
struct sched_param param;
param.sched_priority = 99;
if(sched_setscheduler(0, SCHED_RR, ¶m) == -1)
{
perror("setting priority");
exit(1);
}
-------------------------------
after the function sched_setcheduler called, errno = EINVAL and error message is "Invalid argument".
What's the reason?
How can make it effect?
Thanks!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have an HP PPM (ITG) application that is running an awk command in cygwin bash shell as part of ITG process moving SAP transports on a Windows 2003 server. The awk command checks the first two characters of a file containing return code that was retrieved from the SAP server. It is throwing the... (3 Replies)
Discussion started by: accsam1
3 Replies
2. UNIX for Dummies Questions & Answers
Hi,
No need to say I'm new to unix shell scripting.
I have a very simple script that goes this way:
for datos in `ls -rt $UNXLOG/26-Jan*`
do
export arch=`echo $datos |cut -d, -f1`
if
then
export linea1=`grep Debut ${arch}`
export horatot=`echo $linea1 |cut -d' ' -f5`
... (7 Replies)
Discussion started by: mvalonso
7 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I am compiling following code on my Linux box using "cc" compilers.I am getting the desired o/p but in the it throws message as "shell returned 208".I would like to know whether is it related to a some kind of error code?
1 #include<stdio.h>
2
3 main ()
4 {
... (1 Reply)
Discussion started by: forstudy3
1 Replies
4. Shell Programming and Scripting
Hi everyone,
I have a problem with my shell script. As a quick overview I need to change a template file 6561 times and copy the file into a new catalogue. Thanks to your forum I have managed to write a script to do so:
#!/bin/sh
template=$1
for values in {45,165,285}\ {45,165,285}\... (6 Replies)
Discussion started by: mario8eren
6 Replies
5. Shell Programming and Scripting
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Discussion started by: shis100
7 Replies
6. UNIX for Advanced & Expert Users
Hi guys,
i'm running a program on samsumg 6410 arm cpu board. it caused an "free(): invalid next size (normal)" fail.
i try to use gdb for remote debugging:
1, start gdb server on board:
gdbserver 192.168.1.20:1234 ./HostAP
Process ./HostAP created; pid = 499
Listening on port... (8 Replies)
Discussion started by: ss1969
8 Replies
7. Shell Programming and Scripting
Hi ,
we have a issue in server, we are running a perl script to connect our clients, but we are not able to connect, every time we are getting the
"Invalid argument error"
Even i checked all the necessary perl modules are i installed in this server,
#create the listen socket
my... (2 Replies)
Discussion started by: anishkumarv
2 Replies
8. Shell Programming and Scripting
I'm trying to execute something like this:
exec perl -i -pe 's/\015/\012/g' '${file}'
in my expect script and I get:
error "invalid command name \"perl\".
however, if I run
perl -i -pe 's/\015/\012/g' "/Users/Shared/menu-items.txt"
directly in my terminal, it runs fine. I'm an... (4 Replies)
Discussion started by: dpouliot
4 Replies
9. Emergency UNIX and Linux Support
Hi,
I am running a perl script to automate a process and I keep running into a error can't find the "value"
Can't call method "value" on an undefined value at process_file.pl line 44.
file is CVS
cell is ifdfdxrfmp.ksh
Here is the script I have also attached it as well:
... (2 Replies)
Discussion started by: vpundit
2 Replies
10. AIX
The Follwing packages are installed on my AIX 6.1 box
gcc-4.7.2-1
gcc-c++-4.7.2-1
gcc-cpp-4.7.2-1
gcc-gfortran-4.7.2-1
libgcc-4.7.2-1
libgomp-4.7.2-1
libstdc++-4.7.2-1
libstdc++-devel-4.7.2-1
gmp-5.0.5-1
libmpc-1.0.1-2
libmpc-devel-1.0.1-2
libmpcdec-1.2.6-1
libmpcdec-devel-1.2.6-1... (0 Replies)
Discussion started by: Ashish Gupta
0 Replies
LEARN ABOUT CENTOS
sched_getparam
SCHED_SETPARAM(2) Linux Programmer's Manual SCHED_SETPARAM(2)
NAME
sched_setparam, sched_getparam - set and get scheduling parameters
SYNOPSIS
#include <sched.h>
int sched_setparam(pid_t pid, const struct sched_param *param);
int sched_getparam(pid_t pid, struct sched_param *param);
struct sched_param {
...
int sched_priority;
...
};
DESCRIPTION
sched_setparam() sets the scheduling parameters associated with the scheduling policy for the process identified by pid. If pid is zero,
then the parameters of the calling process are set. The interpretation of the argument param depends on the scheduling policy of the
process identified by pid. See sched_setscheduler(2) for a description of the scheduling policies supported under Linux.
sched_getparam() retrieves the scheduling parameters for the process identified by pid. If pid is zero, then the parameters of the calling
process are retrieved.
sched_setparam() checks the validity of param for the scheduling policy of the process. The value param->sched_priority must lie within
the range given by sched_get_priority_min(2) and sched_get_priority_max(2).
For a discussion of the privileges and resource limits related to scheduling priority and policy, see sched_setscheduler(2).
POSIX systems on which sched_setparam() and sched_getparam() are available define _POSIX_PRIORITY_SCHEDULING in <unistd.h>.
RETURN VALUE
On success, sched_setparam() and sched_getparam() return 0. On error, -1 is returned, and errno is set appropriately.
ERRORS
EINVAL The argument param does not make sense for the current scheduling policy.
EPERM The calling process does not have appropriate privileges (Linux: does not have the CAP_SYS_NICE capability).
ESRCH The process whose ID is pid could not be found.
CONFORMING TO
POSIX.1-2001.
NOTES
Scheduling parameters are in fact per-thread attributes on Linux; see sched_setscheduler(2).
SEE ALSO
getpriority(2), nice(2), sched_get_priority_max(2), sched_get_priority_min(2), sched_getaffinity(2), sched_getscheduler(2),
sched_setaffinity(2), sched_setscheduler(2), setpriority(2), capabilities(7)
Programming for the real world - POSIX.4 by Bill O. Gallmeister, O'Reilly & Associates, Inc., ISBN 1-56592-074-0.
COLOPHON
This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2013-02-12 SCHED_SETPARAM(2)