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 DEBIAN
sched_getscheduler
SCHED_SETSCHEDULER(2) BSD System Calls Manual SCHED_SETSCHEDULER(2)
NAME
sched_setscheduler, sched_getscheduler -- set/get scheduling policy and scheduler parameters
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <sched.h>
int
sched_setscheduler(pid_t pid, int policy, const struct sched_param *param);
int
sched_getscheduler(pid_t pid);
DESCRIPTION
The sched_setscheduler() system call sets the scheduling policy and scheduling parameters of the process specified by pid to policy and the
parameters specified in the sched_param structure pointed to by param, respectively. The value of the sched_priority member in the param
structure must be any integer within the inclusive priority range for the scheduling policy specified by policy.
In this implementation, if the value of pid is negative the system call will fail.
If a process specified by pid exists and if the calling process has permission, the scheduling policy and scheduling parameters will be set
for the process whose process ID is equal to pid.
If pid is zero, the scheduling policy and scheduling parameters are set for the calling process.
In this implementation, the policy of when a process can affect the scheduling parameters of another process is specified in IEEE Std
1003.1b-1993 (``POSIX.1'') as a write-style operation.
The scheduling policies are in <sched.h>:
[SCHED_FIFO] First-in-first-out fixed priority scheduling with no round robin scheduling;
[SCHED_OTHER] The standard time sharing scheduler;
[SCHED_RR] Round-robin scheduling across same priority processes.
The sched_param structure is defined in <sched.h>:
struct sched_param {
int sched_priority; /* scheduling priority */
};
The sched_getscheduler() system call returns the scheduling policy of the process specified by pid.
If a process specified by pid exists and if the calling process has permission, the scheduling parameters for the process whose process ID is
equal to pid are returned.
In this implementation, the policy of when a process can obtain the scheduling parameters of another process are detailed in IEEE Std
1003.1b-1993 (``POSIX.1'') as a read-style operation.
If pid is zero, the scheduling parameters for the calling process will be returned. In this implementation, the sched_getscheduler system
call will fail if pid is negative.
RETURN VALUES
Upon successful completion, the value 0 is returned; otherwise the value -1 is returned and the global variable errno is set to indicate the
error.
ERRORS
On failure errno will be set to the corresponding value:
[ENOSYS] The system is not configured to support this functionality.
[EPERM] The requesting process doesn not have permission as detailed in IEEE Std 1003.1b-1993 (``POSIX.1'').
[ESRCH] No process can be found corresponding to that specified by pid.
[EINVAL] The value of the policy argument is invalid, or one or more of the parameters contained in param is outside the valid
range for the specified scheduling policy.
SEE ALSO
sched_getparam(2), sched_get_priority_max(2), sched_get_priority_min(2), sched_rr_get_interval(2), sched_setparam(2), sched_yield(2)
STANDARDS
The sched_setscheduler() and sched_getscheduler() system calls conform to IEEE Std 1003.1b-1993 (``POSIX.1'').
BSD
March 12, 1998 BSD