system-calls Questions

9

Solved

I have a program that saves many large files >1GB using fwrite It works fine, but unfortunately due to the nature of the data each call to fwrite only writes 1-4bytes. with the result that the writ...
Chiastic asked 27/11, 2012 at 16:7

3

Solved

I'm having a problem with a perl script. In my script, I call another program with a system() call, but I got this error: Can't exec "./Classificador/svm_classify": No such file or direct...
Chaparro asked 25/12, 2012 at 17:39

6

Solved

I have read about system calls in Linux, and everywhere description is given regarding x86 architecture (0x80 interrupt and SYSENTER). But I am not able to track down the files and process for a sy...
Erfurt asked 18/10, 2012 at 4:9

1

Solved

My co-worker asked me why his code cannot run in concurrency in multi-threads. I discover the os.system function is acting weird unlike the other functions in multi-threads. I code a small demo to ...
Mindimindless asked 17/11, 2020 at 9:18

4

Solved

POSIX systems expose family of exec functions, that allow one to load something maybe different into current process, keeping open file descriptors, process identifier and so on. This can be done ...
Frowzy asked 15/12, 2015 at 13:22

1

Linux 4.18 introduced the rseq(2) syscall. I found only one question on SO that mentions rseq at all, and there is relatively little information about it online, so I decided to ask. What are resta...
Verret asked 25/4, 2023 at 14:33

2

My understanding of system calls is that in Linux the system call mechanism (int 0x80 or whatever) is documented and guaranteed to be stable across different kernel versions. Using this information...
Manysided asked 27/2, 2014 at 12:50

3

Solved

Suppose I want to completely take over the open() system call, maybe to wrap the actual syscall and perform some logging. One way to do this is to use LD_PRELOAD to load a (user-made) shared object...
Diophantus asked 7/9, 2010 at 21:19

4

Starting with an absolute file path, I want to obtain the following information: The mount point of the filesystem on which the file is stored (in order to compute the path relative to the mount ...
Panthea asked 4/7, 2016 at 13:3

2

Is it possible to call OS system calls like open, close etc from a shell script? I tried googling but it takes me in the wrong direction of using the system() command. Can some one help on this?
Headwards asked 17/4, 2012 at 17:54

6

Solved

I want to write a signal handler to catch SIGSEGV. I protect a block of memory for read or write using char *buffer; char *p; char a; int pagesize = 4096; mprotect(buffer,pagesize,PROT_NONE) T...
Ulrika asked 18/4, 2010 at 18:44

4

Solved

Is it possible to call a static object (.so) file from Go? I've been searchign Google and I keep hitting upon the claim that I can do lib, _ := syscall.LoadLibrary("...") But trying this gives a...
Astra asked 16/12, 2014 at 14:10

2

Solved

Registering a level triggered eventfd on epoll_ctl only fires once, when not decrementing the eventfd counter. To summarize the problem, I have observed that the epoll flags (EPOLLET, EPOLLONESHOT ...
Schoolmarm asked 6/6, 2020 at 12:3

2

Solved

As i'm writing this command after i shift to the kernel. When i compile it, it wasn't showing any list.Is there any other command to open the list ? open /arch/x86/syscalls/syscall_32.tbl
Imperator asked 29/4, 2015 at 18:28

3

Solved

I know syscall 1 means write, but is there a command to list all implemented syscall names and numbers on linux in bash?
Mont asked 23/9, 2011 at 12:32

4

Solved

Using Go what package, native function, syscall could be used to obtain the default gateway on a *nix system I would like to avoid creating a wrapper arround netstat, route, ip, etc commands, or r...
Retardant asked 18/11, 2016 at 17:23

2

Solved

I am on windows 10, with Cygwin installed. I have been using Cygwin for the compilation/assembly of c and assembly programs using Cygwin-installed "gcc" and "nasm". From what I know, nasm has a -f ...
Spawn asked 20/4, 2018 at 18:44

5

Solved

I'm trying to retrieve the current uptime of my Go application. I've seen there's a package syscall which provides a type Sysinfo_t and a method Sysinfo(*Sysinfo_t) which apparently allows you to ...
Hectoliter asked 23/6, 2016 at 13:10

5

Solved

I'm working on a piece of software that monitors other processes' system calls using ptrace(2). Unfortunately most modern operating system implement some kind of fast user-mode syscalls that are ca...
Swansdown asked 26/11, 2011 at 16:55

4

What is the meaning of "blocking system call"? In my operating systems course, we are studying multithreaded programming. I'm unsure what is meant when I read in my textbook "it can allow another ...
Morceau asked 11/10, 2013 at 2:8

1

Solved

I have looked at similar questions, but cannot seem to find what is wrong with my code. I am attempting to make the "write" syscall on MacOS to print a string to standard output. I am abl...
Deka asked 25/12, 2022 at 14:13

1

Solved

I use fexecve(3) on Linux to execute a binary held in a memfd. Is there an equivalent for macOS? I've tried execve("/dev/fd/%d", [], []), but it failed with EACCES. Copying the file from that path...
Vitrescent asked 2/7, 2018 at 22:13

3

Solved

I wanted to know which system call is used in linux by the ls command to display the folder's (or file's name)? Especially the files/folders starting with "." (dot) I executed the strace ls -a com...
Abdul asked 16/10, 2012 at 18:19

2

Solved

This is how one can get a (POSIX) terminal size with a syscall in go: func getTermDim() (width, height int, err error) { var termDim [4]uint16 if _, _, err := syscall.Syscall6(syscall.SYS_IOCTL,...
Gloss asked 22/6, 2018 at 10:45

0

For example, functions like futex_wake/futex_wait, epoll_ctl/epoll_wait, pthread_create provide acquire/release semantics. That's to say, I made some changes before calling futex_wake, and then the...
Lynnett asked 25/7, 2022 at 12:42

© 2022 - 2024 — McMap. All rights reserved.