I have Node.js application which is running under Linux system and uses log4js logging library. Log files are daily rolled by Linux rolling system. The question is the following: somebody know how force the log4js to recreate and use original log file when it’s renamed somehow? Note, Log4js continue wri…
Tag: linux
glibc Cross Compile Configure Error
I would like to cross compile glibc. But, I ‘m getting an error. glibc version is 2.24. I tried compiling host and target i686-elf. My $MACHTYPE environment label is x86_64-pc-linux-gnu. Target directory includes binutils-2.27 and gcc-6.2.0. My PATH environment is: /home/ercan/cross/tools/tools_binaries…
Linux user space threads, kernel threads , lightweight processes
I am bit confused with all this enteties and how they interconnected in Linux. “Unix internals” book states that lightweight process (LWP) is kernel-supported user thread, and that kernel doesn’t see threads inside processes. Is it stil true for Linux? As I understand, user-space threads sch…
Why GOT entry offset appears wrong?
I wrote simple shared library: Compiled/built: Disassembled, to see how some_func is referenced: Looked where .got.plt is located: What is the relocation: In 6aa-6bb we get absolute location of GOT: 6aa + 0x200956 = 0x201000 That agrees with readelf -S libtest.so ‘s output. We skip 3 reserved bytes in G…
DMD2 fails to compile shared library on Linux, amd64
I’ve been programming on a 32 bit machine, until recently, I upgraded to a 64 bit one. I’m using the latest version of DMD (amd64), on xubuntu 16.04 (amd64). Before the upgrade, I could easily compile shared libs using dmd -shared ‘FILES’, but now, it gives an error. I have a file name…
How do I find waiting readers/writers for Linux System V Msg Queues?
I’m tasked with porting some C/C++ code that uses System V queues from HP-UX to Red Hat Linux (SVr4). Most of the calls have translated over fine, but I’m having difficulty with one specific issue as it relates to discovering waiting readers and writers on a given queue. On HP, one can use msgctl(…
On a Mac can Mono be used to build with winsock2.h?
Want to practice with some Microsoft specific tools; specifically winsock2.h. I know Mono can be used to make C# programs, but before doing the install I hope to find out if it does more than that. Answer For APIs like winsock2.h, you’re talking about the direct win32 API and related libraries. Mono/C# …
How to connect to a Linux (Debian) VM from the host (Windows 7) using VNC? [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack …
Why signal handler for SIGSEGV doesn’t catch my C++ throw exception?
I was trying to see if SIGSEGV signal hander could help to deal with unhandled exception of C++, I experiment it: $ g++ -g h.cpp -rdynamic && ./a.out terminate called after throwing an instance of ‘int’ Aborted (Core dump) Well, the program doesn’t print crash call stack back trace a…
Bash scripting check condition
I’m new to bash scripting and trying to write the following simple And this works as expected. But if I delete echo “some string’ it prints nothing: Why? Why does deleting echo some_string right after the condition checking breaks the function? Answer It is because the if-condition is execut…