I am running java developer IDE and in a process of trouble shooting a module . For this i have increased the logging memory of the tool, Now when logging it error is coming on console as i am using below command for increasing memory earlier it is my system memory is 16 GB through the command cat /proc/memin…
Tag: linux
Linux context switch internals: What happens when process exits before timer interrupt?
How is context switch made in linux kernel when process exits before timer interrupt? I know that if the process is running and timer interrupt occurs then schedule function is called automatically if the flag is set, schedule function then selects next process to run. Basically in this case the schedule func…
PID of infinite loop run in background (&) in bash script
I have simple bash script How can I assign pid of this loop to variable, to kill process in future ? I try trap, but loop has own pid so I should know pid of loop running in background to kill it for example after SIGTERM. Answer The PID of the background-process started can be extracted from this $! variable…
Mail notifications through Qt on Linux
I want to write a program which would show a pop up if a new mail arrives through Gmail. What library/api am I supposed to use get notifications from Gmail pro-grammatically? Answer You can treat GMail as an IMAP server and work with it like that. You’ll want a C++ IMAP library, there’s quite a fe…
Diifferetn result in Linux and Visual Studio
Does anybody know why compiling program in Visual Studio 2015 gives different result (those are correct I want to keep them) vs Linux Ubuntu (those are wrong).? Answer Reading beyond the end of an array invokes undefined behavior in C. Once your program invokes undefined behavior anything can happen or nothin…
GCC compiled code: why integer declaration needs several statements?
I’m learning AT&T assembly,I know arrays/variables can be declared using .int/.long, or using .equ to declare a symbol, that’s to be replaced by assembly. They’re declared insided either .data section(initialzed),or .bss section(uninitialzed). But when I used gcc to compiled a very simpl…
How can GNU time utility ignores pipe symbol and takes all what left in command line as one execve argument?
Linux, if I run time tar -c stock_file | lz4 > stock_file.lz4, actually it makes something like time (tar -c stock_file | lz4 > stock_file.lz4), but if I write one little program: Then I build it to pretending_time and run it: Well well, the parameter is well not well | cat, then I have the check the so…
Better way of using the redirection symbol in conjunction with find -exec
My goal is to empty every file in a directory. I DON’T want to actually delete the file, I just want to delete it’s contents. If you want to do this with a single file you can do > file.txt If I want to run this operation on every file in a directory I can do this: Notice how the
Replace very near word to a number with another word [closed]
Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 6 years ago. Improve this question Repla…
Mono executes program with wrong current directory
I have a strange problem. I have written a custom spamfilter in C# .NET 4.6 for personal use. And I put this program up to my Raspberry Pi. I have tested many times the program, and everything worked fine, but when I created a cronjob I have noticed that the program never writes log. As I started to test agai…