freebsd

kill - does it kill the process right away?

末鹿安然 提交于 2019-12-22 09:00:09
问题 what does kill exactly do? I have a parent process which is creating 100 (as an example) child processes one after another. At the end of any child's job, I kill the child with kill(pid_of_child, SIGKILL) and I cannot see that in ps output. But if something goes wrong with the parent process and I exit from the parent process with exit(1) (at this point only 1 child is there - I can check tht in ps ), at that point I see a lot of <defunct> processes whose ppid is pid of parent process. How is

SQLite3:CantOpenException (unable to open database file)

扶醉桌前 提交于 2019-12-22 08:16:03
问题 I have FreeBSD setup with Apache 2 and passenger. To test things out I created a test app using the standard Rails new test_app. When I try to access the site through Apache I get the error listed in the title above in the production.log, if I run the Rails server from the test_app directory it works fine. I only have one controller and view in the app right now just a home controller and index view, I am not even accessing a database. 回答1: In apache, it's running in production mode vs.

Can ruby scripts be precompiled into a binary?

那年仲夏 提交于 2019-12-22 05:38:05
问题 I'm working on a Ruby script that will need to be deployed onto systems without a ruby interpreter. It will need to run on FreeBSD systems which uses the ELF format. I know there is a ruby2exe project to compile ruby scripts to run on Windows, but is it easy or even possible to do that on other operating systems? 回答1: Have you checked whether Rubinius or JRuby would allow you to precompile your code? 回答2: Aside from bytecode that requires a VM to run, Ruby cannot be compiled. It is an

Getting GCC in C++11 mode to work on FreeBSD

六月ゝ 毕业季﹏ 提交于 2019-12-22 05:11:34
问题 How do I get a working GCC-based C++11 setup on FreeBSD 10? It seems that the standard library that comes with recent GCC versions on FreeBSD is broken. I've installed the port gcc49 and then try to compile this: #include <string> int main() { auto str = std::to_string(42); str = std::to_string(42ull); str = std::to_string(4.2); str.clear(); return 0; } This gives me an error: g++49 -v -std=c++11 foo.cc Using built-in specs. COLLECT_GCC=g++49 COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc49/gcc

freebsd安装JDK1.6 及一些小问题

孤人 提交于 2019-12-22 00:39:15
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 我们到/usr/ports/java/jdk16安装jdk16的时候,直接stop了。原来这个安装包是需要我们自己到http: //download.java.net/jdk6/6u3/promoted/b05/index.html把三个安装包下载到/usr/ports /distfiles,才能安装的。 那我们就先下载: wget http://www.java.net/download/jdk6/6u3/promoted/b05/jdk-6u3-fcs-src-b05-jrl-24_sep_2007.jar wget http://www.java.net/download/jdk6/6u3/promoted/b05/jdk-6u3-fcs-bin-b05-jrl-24_sep_2007.jar wget http://www.java.net/download/jdk6/6u3/promoted/b05/jdk-6u3-fcs-mozilla_headers-b05-unix-24_sep_2007.jar 还 要到http://java.sun.com/javase/downloads/index.jsp下载 JDK DST Timezone Update Tool - 1.3.6 这里需要注册的

FREEBSD: make install Unknown modifier 'u' Variable ALL_OPTIONS is recursive

巧了我就是萌 提交于 2019-12-21 22:14:06
问题 I am looking for a method to remove the make error message I am getting. Please let me know if there is any suitable solution. My uname -a returns the following: FreeBSD SM2-BSD 6.3-RELEASE FreeBSD 6.3-RELEASE #0: Wed Jan 16 04:18:52 UTC 2008 root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 UPDATE: My make command is running on my old linux machine which is of the same configuration as my new one, running FreeBSD 6.3. I am not getting any errors in that. I tried copying this

Warning: stream_socket_enable_crypto(): SSL operation failed with code 1

早过忘川 提交于 2019-12-21 10:49:57
问题 I have a problem with CSCart, it fails sending mail via google account. To check if there is a problem in server config or in CSCart's scripts I installed clean library PHPMailer and tried to send test message using example script. Result is the same: Warning: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in [script path]/class.smtp.php on line 338 OpenSSL connection

execve(“/bin/sh”, 0, 0); in a pipe

折月煮酒 提交于 2019-12-21 03:58:15
问题 I have the following example program: #include <stdio.h> int main(int argc, char ** argv){ char buf[100]; printf("Please enter your name: "); fflush(stdout); gets(buf); printf("Hello \"%s\"\n", buf); execve("/bin/sh", 0, 0); } I and when I run without any pipe it works as it should and returns a sh promt: bash$ ./a.out Please enter your name: warning: this program uses gets() which is unsafe. testName Hello "testName" $ exit bash$ But this does not work in a pipe, i think I know why that is,

How to color a prompt on FreeBSD/cshrc?

自作多情 提交于 2019-12-20 10:45:07
问题 I'm being put in charge of managing a bunch of servers, I want to set up my prompts on each of them so that I don't get confused as to where I am logged in to. I've edited my .cshrc files and put this in them: set prompt=`whoami`@`hostname -s`:$cwd'$ ' But I'd like to color that prompt so it stands out a bit more. Maybe green with white text or something. How can I do that? I'm not very familiar with the shell syntax. I'm SSH-ing in from the standard terminal that comes with Ubuntu, if that's

Does GPL code linking with proprietary library depend which is created first? [closed]

老子叫甜甜 提交于 2019-12-20 10:28:24
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . Microsoft creates their windows and MFC DLL library, etc. An open source develop write a new MFC application and release the source code as GPL. The app has to link with the MS DLL/libraries to run in Windows, but I don't think anyone can argue that we now have the right to force the Microsoft's GPL their DLL.