All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Lambert <dave@lambsys.com>
To: buildroot@busybox.net
Subject: [Buildroot] nice() seems to have stopped working?
Date: Wed, 18 Oct 2006 13:09:30 -0500	[thread overview]
Message-ID: <45366DDA.9050504@lambsys.com> (raw)

Since moving to this distribution, I notice that some of my programs 
that use nice() give errors when attempting to raise their priorities. 
In order to try and nail this down I wrote the following trivial program:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

int	main(int ac, char *av[])
{
   int n    printf("Trying nice(%d)\n", n);
   if (nice(n) < 0) {		/* Attempt to change priority */
     perror("Nice failed to change priority");
   }
   else {
     printf("Success\n");
   }
   return 0;
}


Running this program as root provides the following output:

/ # whoami
root
/ # niceTest 0
Trying nice(0)
Success
/ # niceTest 1
Trying nice(1)
Success
/ # niceTest -1
Trying nice(-1)
Nice failed to change priority: Success
/ #

Has anyone else experience this behavior?

Best regards,

Dave.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dave.vcf
Type: text/x-vcard
Size: 288 bytes
Desc: not available
Url : http://busybox.net/lists/buildroot/attachments/20061018/fd7b7bf5/attachment.vcf 

             reply	other threads:[~2006-10-18 18:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-18 18:09 David Lambert [this message]
2006-10-18 20:35 ` [Buildroot] nice() seems to have stopped working? Bernhard Fischer

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=45366DDA.9050504@lambsys.com \
    --to=dave@lambsys.com \
    --cc=buildroot@busybox.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.