solaris

Cross compiling for SPARC on x86

∥☆過路亽.° 提交于 2019-12-06 07:21:04
I've seen the about cross compilers reply at How do I cross-compile C code on Windows for a binary to also be run on Unix (Solaris/HPUX/Linux)? I would like to know how can Y compile for SPARC on a x86 machine? Where can i find a good cross compiler? I also need to compile for HP OS. gcc is fully capable of this. Sun's compiler may be capable, but I'm more familiar with gcc. First, you should get comfortable with building gcc, and also decide if you need just the C compiler or if you need C++ or other languages. Once you've built gcc for the host you are on, you can then rebuild gcc to include

javaws missing in Java 8 for Solaris

可紊 提交于 2019-12-06 03:59:09
It looks like Oracle removed Java Web Start from Java 8 for Solaris. javaws isn't available anymore in Java 8u51. From the compatibility guide : The 64-bit binaries do not contain deployment tools such as Java Web Start and Java Plug-in, therefore desktop integration is no longer required. What do they mean with " required "? It's not possible anymore. It's not possible to launch a Web Start application on Solaris with Java 8. Does anyone know an alternate way (standard, no 3rd party stuff) to start a Web Start application on Solaris with Java 8? The "required" means that, as the build for the

go中的关键字-go(下)

妖精的绣舞 提交于 2019-12-05 23:47:30
1. goroutine源码分析 1.1 初始化   go程序的启动流程分为四步 call osinit, 这里就是设置了全局变量ncpu = cpu核心数量 call schedinit make & queue new G (runtime.newproc, go func()也是调用这个函数来创建goroutine) call runtime·mstart   其中,schedinit 就是调度器的初始化,除了schedinit 中对内存分配,垃圾回收等操作,针对调度器的初始化大致就是初始化自身,设置最大的maxmcount, 确定p的数量并初始化这些操作。 schedinit   schedinit这里对当前m进行了初始化,并根据osinit获取到的CPU核数和设置的GOMAXPROCS确定P的数量,并进行初始化。 1 func schedinit() { 2 // 从TLS或者专用寄存器获取当前g的指针类型 3 _g_ := getg() 4 // 设置m最大的数量 5 sched.maxmcount = 10000 6 7 // 初始化栈的复用空间 8 stackinit() 9 // 初始化当前m 10 mcommoninit(_g_.m) 11 12 // osinit的时候会设置 ncpu这个全局变量

XML Transform results in FileNotFoundException

独自空忆成欢 提交于 2019-12-05 21:22:33
The earlier question I posted is closed because of lack of information. Please let me know if I am missing something here. The transformer seems to be adding file:/ to the beginning of my file path. I am working in a Solaris environment, and here is what happens when the transform gets applied: DOMSource sourcexml = new DOMSource(doc); StreamResult resultxml = new StreamResult(new File("file.xml")); transformer.transform(sourcexml, resultxml); The exception I get is: javax.xml.transform.TransformerException: java.io.FileNotFoundException: file:/opt/origenate/or_dev87/apps/documentarchive/file

Improvements to this bash script to simulate “tail --follow”

回眸只為那壹抹淺笑 提交于 2019-12-05 19:34:09
I need to remote tail log files such that the tailing continues working even when the file is rolled over. My attempts to do so, started by directly using the tail command over ssh: ssh root@some-remote-host tail -1000f /some-directory/application.log | tee /c/local-directory/applicaiton.log That allows me to filter through /c/local-directory/applicaiton.log locally using Otroslogviewer (which was the original purpose of trying to tail the log file locally). The above stops tailing when the remote log file is rolled over (which happens at every 10MB). I do not have the access required to

[apue] 神奇的 Solaris pipe

北战南征 提交于 2019-12-05 19:15:06
说到 pipe 大家可能都不陌生,经典的pipe调用配合fork进行父子进程通讯,简直就是Unix程序的标配。 然而Solaris上的pipe却和Solaris一样是个奇葩(虽然Solaris前途黯淡,但是不妨碍我们从它里面挖掘一些有价值的东西), 有着和一般pipe诸多的不同之处,本文就来说说Solaris上神奇的pipe和一般pipe之间的异同。 1.solaris pipe 是全双工的 一般系统上的pipe调用是半双工的,只能单向传递数据,如果需要双向通讯,我们一般是建两个pipe分别读写。像下面这样: 1 int n, fd1[2], fd2[2]; 2 if (pipe (fd1) < 0 || pipe(fd2) < 0) 3 err_sys ("pipe error"); 4 5 char line[MAXLINE]; 6 pid_t pid = fork (); 7 if (pid < 0) 8 err_sys ("fork error"); 9 else if (pid > 0) 10 { 11 close (fd1[0]); // write on pipe1 as stdin for co-process 12 close (fd2[1]); // read on pipe2 as stdout for co-process 13 while (fgets

How do I know if an C program's executable is run in foreground or background?

你。 提交于 2019-12-05 17:29:14
In my C program I want to know if my executable is run in foreground like this $./a.out or like this $./a.out & If you are the foreground job, getpgrp() == tcgetpgrp(STDOUT_FILENO) or STDIN_FILENO or STDERR_FILENO or whichever file descriptor you're attached to your controlling terminal by. (If you're not sure, open("/dev/tty") will always get you a file descriptor to your controlling terminal, if one exists.) This is what openssh does, and is a bit easier than handling SIGTTIN/SIGTTOU if you just want a quick check. On the other hand, you may have been backgrounded $ ./a.out ^Z [1]+ Stopped .

Building Boost on Solaris

落爺英雄遲暮 提交于 2019-12-05 13:06:58
Will Boost build in entirety on Solaris? I'd like to know if anyone has success with this (specifically Proto/Spirit) before I go and pay for a support contract to patch Sun Studio 12.2 to the latest. I get a few errors and some look to have been resolved in patches, but it's not cheap to pay Oracle for support so I'd rather some hope that it will work before I do. Right now, I'm just trying to use cpp-netlib on Solaris and decode some JSON fetched over HTTP using Boost Property Tree. It works fine on Mac OS X - so I'm hoping I can use the same code on Solaris. If you look at http://www.boost

linker option to ignore unused dependencies

怎甘沉沦 提交于 2019-12-05 10:52:14
I would like to remove all unused symbols from my compiled C++ binary. I saw this, which gives an overview using gcc, which is the toolchain I'm using: How to remove unused C/C++ symbols with GCC and ld? However, on my system, the linking option ( -Wl,--gc-sections ) is rejected: $ gcc -fdata-sections -ffunction-sections a.c -o a.o -Wl,--gc-sections ld: fatal: unrecognized option '--' ld: fatal: use the -z help option for usage information collect2: error: ld returned 1 exit status I'm running on illumos, which is a (relatively) recent fork of Solaris, with GCC 4.7. Anybody know what the

expect utility is not working when executing from jenkins

走远了吗. 提交于 2019-12-05 04:16:56
we have a unix script which uses expect utility for interactive execution. This script works well when we run from unix server. If we run this script from Jenkins, it is not working. Below is the script var="xxxxx" expect -c " spawn sudo cp /abcd/sjws/config/obj.conf /abcd/sjws/config/obj.conf_jenkins expect { "Password:" { send $var\r;interact } } exit " Below is the output when we run from jenkins spawn sudo cp /abcd/sjws/config/obj.conf /abcd/sjws/config/obj.conf_jenkins Password: Password: Build step 'Execute shell' marked build as failure Finished: FAILURE Since Jenkins doesn't run it