Skip to content

*** No targets. Stop on Linux using C [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 2 years ago. Improve this question This …

Difference between lsof -c name and lsof | grep ^name?

I’m trying to figure out whether I have a leak in file descriptors using lsof. The -c option to lsof is defined as: Selects the listing of files for processes executing the command that begins with the characters of c. If that’s true then why do these two commands report different numbers? Answer …

assembly, how to use mprotect?

I am trying to make self modifying code in Linux. I thought it would works but didn’t. I used nasm on ubuntu 18.04. INT 0x80 return value is -22 0xffffffea I don’t know what is wrong. Answer Run your program under strace, like strace ./a.out to decode system call args and return values. Probably y…

sharing read-write lock between interprocess

I have two processes rwlock1(parent) and rwlock2(child) . i want to use read-writer lock between processes , i need to transfer pthread_rwlock_t mem_lock to child process, i have a simple code , how can i trasfer the handle . i dont want to use a mutex. rwlock1(parent)’s code Answer I haven’t trie…

Piping to File Utility

I am being sent the bytes of thousands files over an interface, and my app must maintain statistics regarding the counts of various files types which it observes (text, HTML, binary, compressed, etc.). I have been using the subprocess module to run the file utility. However, as the scale has increased, I am h…

How to run a file in variable

I want to run this command: ././pscan `cat ips` 22 but the script don’t run corectly and i want to run command e.g: ././pscan 1.1 22 ././pscan 2.2 22 ././pscan 3.3 22 ././pscan 4.4 22 ././pscan 5.5 22 the script pscan works perfectly when i type on single command ././pscan 1.1 22 and i want to run more …