error "Invalid argument" returned after call sched_setscheduler


 
Thread Tools Search this Thread
Top Forums Programming error "Invalid argument" returned after call sched_setscheduler
# 1  
Old 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, &param) == -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!
# 2  
Old 07-26-2007
Code:
struct sched_param param;

param.sched_priority = 99;

What about the rest of the fields in 'param', are they initialised to zero or just random contents of the stack?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Bison -pap_expr_yy invalid character:% unexpected "identifier" while running make for Apache2.4.3 64

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

2. Emergency UNIX and Linux Support

Perl error: Can't call method "value" on an undefined value

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

3. Shell Programming and Scripting

exec perl in expect script yields "invalid command"

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

4. Shell Programming and Scripting

Perl "Invalid argument error"

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

5. UNIX for Advanced & Expert Users

Trace "free(): invalid next size (normal)" error on arm-linux board

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

6. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

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

7. Shell Programming and Scripting

"Argument list too long" error

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

8. UNIX for Dummies Questions & Answers

"Shell returned" message on Linux

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

9. UNIX for Dummies Questions & Answers

"test: argument expected" error

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

10. Shell Programming and Scripting

awk "Invalid char ' in expession" error

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
Login or Register to Ask a Question