solaris

Java Solaris NIO OP_CONNECT problem

谁说胖子不能爱 提交于 2019-12-21 16:49:08
问题 I have a Java client that connects to a C++ server using TCP Sockets using Java NIO. This works under Linux, AIX and HP/UX but under Solaris the OP_CONNECT event never fires. Further details: Selector.select() is returning 0, and the 'selected key set' is empty. The issue only occurs when connecting to the local machine (via loopback or ethernet interface), but works when connecting to a remote machine. I have confirmed the issue under two different Solaris 10 machines; a physical SPARC and

NSIS support for Linux and Solaris

自作多情 提交于 2019-12-21 07:54:21
问题 Does NSIS support Linux and Solaris? I read somewhere that we can compile nsis script on Linux but cant execute the .exe generated on any other platforms but Windows. Can somebody put more light in this? 回答1: No. See the NSIS feature list for more information ... Portable Compiler The NSIS compiler can be compiled for POSIX platforms like Linux and *BSD. Generated installer will still run on Windows only, but this way they can be generated without Windows or WINE. 回答2: You can compile

gcc: undefined reference to _mcount (gprof instrumentation)

做~自己de王妃 提交于 2019-12-21 03:26:11
问题 When compiling my c++ sources with the -pg option to inject gprof profile instrumentation code the compile fails with the undefined reference to _mcount error. Without this option everything compiles (and runs) fine. What is wrong in my case? (Solaris 10 SPARC Platform) 回答1: Are you both compiling each object file and linking the final executable using the '-pg' flag? 来源: https://stackoverflow.com/questions/4603298/gcc-undefined-reference-to-mcount-gprof-instrumentation

How to view call stack with dtrace

╄→гoц情女王★ 提交于 2019-12-21 02:36:03
问题 How to view call stack, return value and arguments of the simply program below, with dtrace /** Trival code **/ #include <stdio.h> int foo (int *a, int *b) { *a = *b; *b = 4; return 0; } int main (void) { int a, b; a = 1; b = 2; foo (&a, &b); printf ("Value a: %d, Value b: %d\n", a, b); return 0; } 回答1: First off, here's the script: pid$target::foo:entry { ustack(); self->arg0 = arg0; self->arg1 = arg1; printf("arg0 = 0x%x\n", self->arg0); printf("*arg0 = %d\n", *(int *)copyin(self->arg0, 4))

Can a socket be closed from another thread when a send / recv on the same socket is going on?

点点圈 提交于 2019-12-20 09:58:12
问题 Can a socket be closed from another thread when a send / recv on the same socket is going on? Suppose one thread is in blocking recv call and another thread closes the same socket, will the thread in the recv call know this and come out safely? I would like to know if the behavior will differ between different OS / Platforms. If yes, how will it behave in Solaris? 回答1: I don't know Solaris network stack implementation but I'll throw out my theory/explanation of why it should be safe. Thread A

What is the reason and how to avoid the [FIN, ACK] , [RST] and [RST, ACK]

非 Y 不嫁゛ 提交于 2019-12-20 08:59:48
问题 What is the reason and how to avoid the [FIN, ACK] , [RST] and [RST, ACK] ? Is it due to some mismatch between the TCP parameters of the SO´s? What does it mean when the server replies [FIN, ACK] in a TCP/IP connection? 10.118.113.237 is a Solaris box, while 10.118.110.63 is a Linux box. No. Time Source Destination Protocol Length Info 1 0.000000000 10.118.113.237 10.118.110.63 TCP 68 mmpft > 39679 [FIN, ACK] Seq=1 Ack=1 Win=49232 Len=0 TSval=62389927 TSecr=355193509 2 0.000015000 10.118.110

grep command on Solaris 9

淺唱寂寞╮ 提交于 2019-12-20 07:31:41
问题 I faced a strange behavior of a grep command on Solaris 9. For example , I have a host file with two lines: 1.1.1.1 host 1.2.3.4 host-MY I'd like to grep the line contains host string only (not the other line that contain host-MY) I use: grep -Fxq host /etc/hosts but I receive grep: illegal option -- F grep: illegal option -- q grep: illegal option -- x in spite of the fact that this options I can find in grep manual on my Solaris machine 回答1: You're probably not calling the good grep

Resolving unstated -llapack dependency issue on Solaris

限于喜欢 提交于 2019-12-20 03:00:45
问题 I have released an R package on CRAN which depends on the successful compilation of some RcppArmadillo code. The package built correctly and with no notes on all the test systems that I tried (CRAN comments here if interested), however, the CRAN checks fail on solaris-sparc and are unable to load a dependency on solaris-x86 . See here for CRAN checks. The reason for the error is given as ld: fatal: library -llapack: not found (from goldi-00install.html). In my Makevars and Makevars.win , I

Solaris 10 CC Preprocessor bug causes undefined symbols

限于喜欢 提交于 2019-12-20 02:12:09
问题 I have a very very simple C++ file as follows that I'm compiling on Solaris 5-10 with the CC compiler. Here is the source code in my file myTest.C: #include <map> std::map<int, bool> myVar2; I would like to first run the CC pre-processor on this file, examine the pre-processed file, and then compile that pre-processed file into an object file. I call this "indirect-compiling". To do this, I do the following: % CC -P -o myFile_indirect.i myFile.C % CC -c -o myFile_indirect.o myFile_indirect.i

Join lines based on pattern

若如初见. 提交于 2019-12-20 01:52:27
问题 I have the following file: test 1 My 2 Hi 3 i need a way to use cat ,grep or awk to give the following output: test1 My2 Hi3 How can i achieve this in a single command? something like cat file.txt | grep ... | awk ... Note that its always a string followed by a number in the original text file. 回答1: sed 'N;s/\n//' file.txt This should give the desired output when the content is in file.txt 回答2: paste -d "" - - < filename This takes consecutive lines and pastes them together delimited by the