![]() |
| | #1 |
| C++ Programmer Join Date: Aug 2005
Posts: 39
| ReadProcessMemory/WriteProcessMemory Linux equivalent? The Win32 Api has the functions ReadProcessMemory and WriteProcessMemory, to read/write the memopry of a certain process. But I'm a Linux user, and after a lot of searching I can't find equivalent functions that work on Linux. Do they actually exists, and if so, do I need a library or something? |
| MrLucky is offline | |
| | #2 |
| and the hat of Jobseeking Join Date: Aug 2001 Location: The edge of the known universe
Posts: 21,705
| |
| Salem is offline | |
| | #3 |
| C++ Programmer Join Date: Aug 2005
Posts: 39
| woot thanks a lot! Btw, is there any function to ge a list of running processes with their pid's? Last edited by MrLucky; 07-27-2007 at 03:33 AM. |
| MrLucky is offline | |
| | #4 |
| Cat without Hat Join Date: Apr 2003
Posts: 8,492
| No, you have to browse the /proc directory. Just what are you trying to do?
__________________ All the buzzt! CornedBee"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code." - Flon's Law |
| CornedBee is offline | |
| | #5 |
| Kernel hacker Join Date: Jul 2007 Location: Farncombe, Surrey, England
Posts: 15,686
| If it's a process that you started, then you can also do "jobs" or some such. Or "ps". ("ps ax" will list ALL processes in the system). But bear in mind that ptrace only works on processes that you own, unless you are root, so you can't poke around in someone elses processes (which is the same in Windows of course). -- Mats |
| matsp is offline | |
| | #6 | ||
| C++ Programmer Join Date: Aug 2005
Posts: 39
| Quote:
![]() Quote:
| ||
| MrLucky is offline | |
| | #7 |
| Senior software engineer Join Date: Mar 2007 Location: Portland, OR
Posts: 5,768
| |
| brewbuck is offline | |
| | #8 |
| Registered User Join Date: Nov 2006
Posts: 510
| He has just to use the program lcap to enable the CAP_SYS_PTRACE capability. This can be done at run time without changing the kernel |
| pheres is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Equivalent to volume serial number in linux | Elkvis | Linux Programming | 8 | 06-30-2009 08:46 PM |
| Linux equivalent to Win32 ShellExecute | BobS0327 | Linux Programming | 4 | 06-07-2006 04:35 AM |
| Linux equivalent of con | dwks | Linux Programming | 3 | 11-12-2005 11:58 AM |
| Linux equivalent to CreateDirectory | Rak'kar | Linux Programming | 2 | 07-10-2004 12:04 PM |
| .bat equivalent for linux | ichijoji | Linux Programming | 8 | 03-07-2004 08:06 AM |