How do I start a process (another Python script, for example) from a Python script so the “child” process is completely detached from the “parent”, so the parent can a) continue on its merry way without waiting for child to finish and b) can be terminated without terminating the child …
Tag: linux
Nginx(proxy) + Apache: two process listening same port
I have two servers on CentOS: Nginx(proxy) + Apache. I need restart Nginx but if i try to test configuration before restart, i have next error: How i can solve this problem? Thanks! P.S. Nginx has listen port 80, apache listen 81. Answer I don’t know why this error has appeared, but after I made error h…
How to terminate process from Python using pid?
I’m trying to write some short script in python which would start another python code in subprocess if is not already started else terminate terminal & app (Linux). So it looks like: Have problem of lacking knowledge to name proces by pid which app reads from file “.proc”. The other prob…
gmon.out is not created when executable forks another executable
I am using gprof for profiling. But gmon.out is not created when I fork another executable inside the main executable which is compiled with option -pg. Any idea how to resolve it. Answer But gmon.out is not created when I fork another executable It probably does. It simply has the same name as all the other …
Command Line to find and delete Similar files in Linux
I want to find and delete all the “similar files as shown below” recursively from the specified directory of my Linux Server by Using COMMAND LINE…. “file.php?p=10&file=load%2Fnew Animations 1%2FAwesome_flowers-(text1).gif&sort=0” “file.php?p=10&file=load%2Fnew …
Delete files older than X minutes
I would like to delete files that are older than 59 minutes. I have this so far: This doesn’t work and seems to delete all files. I’ve tested this several times and I think the issue is to do with daystart. I’ve read the man page and it seems to base time on the beginning of the day rather t…
Multithreaded Programming with Bash Script
I am running a bash script as like that: Every time when I send a request I have to wait to finish it and write to a file and after that it continues to looping. However I want to do it asynchronously. I mean that it will send a request and loop without waiting response. However when a response comes
go install always uses GOROOT/bin instead of GOPATH
I’m having annoying issue with go install command. Every time I try to run it within the src directory of my GOPATH the resulted file is getting created in GOROOT/bin directory for some reason. I verified my environmental variables in .bashrc and also run ‘go env’ (see below) and couldn̵…
How to pass a value to a builtin Linux kernel module at boot time?
I want to pass a custom parameter to the kernel at boot time, which my new code will use. This parameter is a number. I know how to pass value to kernel module using kernel command line i.e module_param(). Now i want to pass value from u-boot. Is there a way to do this, either during or after boot? Answer
How to correctly include the support library in non-Eclipse Android application
I am thinking how to get Android’ s support library to include and compile outside Eclipse. I am using Linux as my build environment and I am not using any IDE for creating apps, only the basic Android SDK. I have only come over answers to this question regarding Eclipse, but how can I do it using only …