[osol-code] setting process priority with nice() command

2011-03-07 Thread Alex B.
Hello, It's necessary for me to change the priority of my application's process from the code. I try to use the nice() function to set the priority and priocntl() to read the current process' priority, but I get priority=0 before the nice() and priority=19 after the nice() without respect to th

[osol-code] Privileges of a process

2011-02-08 Thread Alex B.
Hello, I'm trying to create a pset with pset_create() and I get errno=1. In the man of pset_create() is written that this happens when the {PRIV_SYS_RES_CONFIG} privilege is not asserted in the effectvie set of the calling process. Is the problem indeed in the privilege? Now I'm trying to add th

[osol-code] Binding process to pset with pset_bind()

2011-01-24 Thread Alex B.
Hello, I know that some OS's do not allow setting affinity of an inactive process (that was just created and is not running) to a processor. How does it work in Solaris? Can I bind a new-born process to a pset right after the "create" function? Thanks! -- This message posted from opensolaris.or

[osol-code] CPU cycles counter

2011-01-18 Thread Alex B.
Hello, is there a method in Solaris10 to count the number of CPU cycles/ticks? Thanks -- This message posted from opensolaris.org ___ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolari

Re: [osol-code] Non-blocking vs. blocking sockets

2011-01-13 Thread Alex B.
Thank you! -- This message posted from opensolaris.org ___ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

[osol-code] Non-blocking vs. blocking sockets

2011-01-13 Thread Alex B.
Hi, I know that with fcntl() I can configure a socket to be non-blocking: fcntl(socket, F_SETFL, O_NONBLOCK); (with O_NONBLOCK attribute), but how do I configure a socket to be blocking - as opposite to "non-blocking"? Thanks! -- This message posted from opensolaris.org _

Re: [osol-code] Solaris compilation flag

2011-01-13 Thread Alex B.
Yes, thanks! -- This message posted from opensolaris.org ___ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

[osol-code] Solaris compilation flag

2011-01-13 Thread Alex B.
Hello, I'm searching for Solaris compilation flag. I know that such a flag exists in all OSs, so I assume, that Solaris also must have one. Thanks in advance! Alex -- This message posted from opensolaris.org ___ opensolaris-code mailing list opensolar

[osol-code] O_ASYNC flag in Solaris

2011-01-10 Thread Alex B.
Hi, I'm migrating code from Linux to Solaris 10 and I'm having some trouble with fcntl() function. In the original code I've an attribute in fcntl() func - O_ASYNC. This attribute exists in Linux only, therefore when I compile the code in Solaris, I get an error that O_ASYNC is undeclared ident