Tag Info

Hot answers tagged

10

Conceptually, a library function is part of your process. At run-time, your executable code and the code of any libraries (such as libc.so) it depends on, get linked into a single process. So, when you call a function in such a library, it executes as part of your process, with the same resources and privileges. It's conceptually the same as calling a ...


5

It is not possible because system call table (called sys_call_table) is a static size array. And its size is determined at compile time by the number of registered syscalls. This means there is no space for another one. You can check implementation for example for x86 architecture in arch/x86/kernel/syscall_64.c file, where sys_call_table is defined. Its ...


4

When a writer writes to a pipe and the pipe is full (its size is limited to a few kilobytes), its process blocks until one of the readers frees some space. Similarly, when a reader reads from a pipe, its process blocks until there is something there. There are also asynchronous writes and reads that a programmer can use to queue up these reads and writes. ...


3

system() is equivalent to fork() + exec() + wait(); this means when a process run system() function it creates a new process and waits the end of this process. The new process executes the command in it's own environment, when it has finished the caller receives the signal child. For further information man exec man system "exec replaces the current ...


3

An ioctl goes to a driver, so the most important thing to figure out what an ioctl is doing is which driver is handling it. What you've read about type, number and data_type is a convention that driver writers are supposed to use when choosing ioctl numbers. Although different drivers can use the same value to mean completely different things, it's best to ...


3

Adding to Useless' answer: Library functions are faster than system calls, and usually do not contain permission/security considerations, as they are running with the process' privileges and it's memory. Syscalls on the other hand, since they run in the kernel, have access to everything in the system, and so they need to control what the calling process can ...


2

The number is the man section. The 3 is for library calls. Here is the full list from man(1): 1 Executable programs or shell commands 2 System calls (functions provided by the kernel) 3 Library calls (functions within program libraries) 4 Special files (usually found in /dev) 5 File formats and conventions eg /etc/passwd 6 ...


2

Pipes are usual unix descriptors at the programmatic level. When you setup two programs to communicate through a pipe, all they see at first is the standard output and standard input descriptors, which they interact with, because the shell did setup them that way. There are some peculiarities with these descriptors when setup this way, but processi interact ...


2

You'll need to identify what server process on the server runs the rsh aka shell service. Traditionally, it's started by the inetd or xinetd meta-daemon which listens on the shell TCP port (514) and runs the rshd command upon an incoming connection. lsof -i tcp:shell (as root) Will tell you what process is listening on that port. You can strace that ...


2

As derobert already indicated, probably the easiest way to get a different name in the process talbe is by renaming the 'private' python executable from python to wing_ide. The startup command, /usr/bin/wing4.1, is actually a minimal schell script calling a second script /usr/lib/wingide4.1/run-wing.sh this I patched as follows: @@ -66,7 +66,9 @@ # ...


2

A process can only write to its own /proc/pid/comm. So since it sounds like you can modify the IDE's code, you can just have it write to /proc/self/comm. Another option would be to change the name of its Python executable, and then change all the #! lines, but that may be a PITA. Other—more painful—options would be writing some C code and using LD_PRELOAD ...


1

These are the two scenarios where a block of sufficient size has been found. Notice in the first case, we are removing an entire node (fits) from memlist by linking the previous node's next pointer to the next pointer of this node. This block is then used in the return value, so I presume from that and the comments, etc. that the intent here is to find ...


1

You can see the entire command used to invoke a process using top, but it doesn't show it by default. Toggle that with lower case c. This should enable you to distinguish one python app from another. The difference between the command line invocation and the process name shows up in proc too, as cmdline and comm.


1

I don't have that much experience with rsh, but this is how I would solve it using strace. You can strace a running process using the -p flag. So something like this linux$ strace -p $(pidof rshd) -o logfile.txt Either that or you can modify the script that starts the rsh deamon to use strace. It might be good to use strace -o logfile for this, since ...



Only top voted, non community-wiki answers of a minimum length are eligible