solaris-10

Is write() safe to be called from multiple threads simultaneously?

左心房为你撑大大i 提交于 2019-12-19 11:29:50
问题 Assuming I have opened dev/poll as mDevPoll , is it safe for me to call code like this struct pollfd tmp_pfd; tmp_pfd.fd = fd; tmp_pfd.events = POLLIN; // Write pollfd to /dev/poll write(mDevPoll, &tmp_pfd, sizeof(struct pollfd)); ...simultaneously from multiple threads, or do I need to add my own synchronisation primitive around mDevPoll ? 回答1: Solaris 10 claims to be POSIX compliant. The write() function is not among the handful of system interfaces that POSIX permits to be non-thread-safe,

Bash script to monitor process and sendmail if failed

折月煮酒 提交于 2019-12-19 04:14:24
问题 I realize that I can’t reliably count on ps | grep or variants to accurately tell me what PID is started. However I know what I need for interim until this problem is resolved in the next release. I have a process named Foo that is the parent, TEST1 and TEST2 are the child processes. If TEST1 and/or TEST2 dies off Foo will continue to run and will not respawn TEST1 and/or TEST2 which is needed to function properly. How do I know this because the program to restart TEST1 and/or TEST2 requires

Group more than one regular expression in the same command

妖精的绣舞 提交于 2019-12-13 08:42:57
问题 How to group two regular expression in one command example if have a file like: age22 Helwan University Engineering Faculty ITI-intake33 bye FOr NOW i am mahmoud 34 mie 4 a And I want to search for the line that start with by and end with W ??? Using grep command 回答1: You don't need more than one regular expression for this. grep '^by.*W$' filename.txt should suffice. 来源: https://stackoverflow.com/questions/12921217/group-more-than-one-regular-expression-in-the-same-command

issue with SNMP install on Solaris10x86

有些话、适合烂在心里 提交于 2019-12-13 05:12:52
问题 I did install net-snmp-5.7.3 on solaris11 sparc,11x86 and Solaris10, all test cases and installation was success. But when I am installing net-snmp-5.7.3 on Solaris10x86, i am getitng few test cases failed. I have already disabled running snmp which comes inbuilt. Details: bash-3.2# uname -a SunOS sca00jzu 5.10 Generic_148889-02 i86pc i386 i86pc bash-3.2# gcc --ver Reading specs from /usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3/specs Configured with: /builds/sfw10-gate/usr/src/cmd/gcc/gcc-3.4.3

Why timer_create throw error for SIGEV_THREAD in solaris 10?

妖精的绣舞 提交于 2019-12-13 03:37:56
问题 I wrote a piece of by using timer_create for sets the timer to invoke a thread in which i set sigev_notify as SIGEV_THREAD, it is giving me error EINVAL(Invalid argument) but when i am setting sigev_notify as SIGEV_SIGNAL code is working fine. my this piece of code is working in all OS even in solaris 11 but for solaris 10 giving me error. code given below: { int status =0; struct itimerspec ts; struct sigevent se; se.sigev_notify = SIGEV_THREAD; se.sigev_value.sival_int = val; se.sigev

in bash, heredoc inside function returns syntax error

谁说我不能喝 提交于 2019-12-12 15:46:36
问题 I have the following function: #!/bin/bash get_instance{ dbname=$(sqlplus -s / as sysdba<<EOF set pages 0 set feedback off select name from v\$database; exit; EOF) echo $dbname } get_instance It seems to work. In the middle of the error message, I get my dbname , but still returns a syntax error. oracle@testdb01:db01:/home/oracle/ > ./test.sh ./test.sh: line 3: get_instance{: command not found DB01 ./test.sh: line 11: syntax error near unexpected token `}' ./test.sh: line 11: `}' If I remove

Is there a wget command for Solaris 10

♀尐吖头ヾ 提交于 2019-12-06 19:12:10
问题 Solaris 11 has wget command, like Linux's. Is there wget or wget like command for Solaris 10? 回答1: The wget command in Solaris 10 is somewhat hidden from sight. You can find it here /usr/sfw/bin/wget This was checked on s10u10 回答2: My Solaris system has it installed, but I do not control the image we use to install it. I see this: $ which wget /usr/sfw/bin/wget $ wget --version GNU Wget 1.12 built on solaris2.10. $ pkginfo -l SUNWwgetr PKGINST: SUNWwgetr NAME: GNU wget - utility to retrieve

Is there a wget command for Solaris 10

懵懂的女人 提交于 2019-12-05 00:13:22
Solaris 11 has wget command, like Linux's. Is there wget or wget like command for Solaris 10? The wget command in Solaris 10 is somewhat hidden from sight. You can find it here /usr/sfw/bin/wget This was checked on s10u10 My Solaris system has it installed, but I do not control the image we use to install it. I see this: $ which wget /usr/sfw/bin/wget $ wget --version GNU Wget 1.12 built on solaris2.10. $ pkginfo -l SUNWwgetr PKGINST: SUNWwgetr NAME: GNU wget - utility to retrieve files from the World Wide Web (root) CATEGORY: system ARCH: i386 VERSION: 11.10.0,REV=2005.01.08.01.09 BASEDIR: /

How to tell CPAN about path to make and cc

二次信任 提交于 2019-12-04 04:57:05
Running Perl 5.10 CPAN on Solaris with opencsw.org packages, Makefile.PL from packages can't find the correct path and cc (gcc). I found the path to make and set it to gmake, but I can't find any setting for cc. I thought I once set this in CPAN/Config.pm (or with o config ...) but can no longer find any setting and don't have enough patience to wade through the thicket to figure out where such a basic thing gets set. Does anyone know? cpan doesn't need to know where gcc or equivalent is, because it isn't cpan 's job to call it directly. Usually it's Makefile.PL or Build.PL that needs to know

Why timer_create throw error for SIGEV_THREAD in solaris 10?

拥有回忆 提交于 2019-12-02 08:50:19
问题 I wrote a piece of by using timer_create for sets the timer to invoke a thread in which i set sigev_notify as SIGEV_THREAD, it is giving me error EINVAL(Invalid argument) but when i am setting sigev_notify as SIGEV_SIGNAL code is working fine. my this piece of code is working in all OS even in solaris 11 but for solaris 10 giving me error. code given below: { int status =0; struct itimerspec ts; struct sigevent se; se.sigev_notify = SIGEV_THREAD; se.sigev_value.sival_int = val; se.sigev