def- / nim-syscall

Raw system calls for Nim
MIT License
40 stars 4 forks source link

Can't pass null to syscall #1

Closed amigrave closed 5 years ago

amigrave commented 5 years ago

I'd like to call splice syscall and pass NULL but can't find a way to do so, eg:

result = syscall(SPLICE, fd_in, nil, fd_out, nil, length, SPLICE_FLAGS)

http://man7.org/linux/man-pages/man2/splice.2.html

def- commented 5 years ago

It seems to compile to me. What is the problem exactly?

amigrave commented 5 years ago

Hi @def- ,

I'm sorry, my mistake was in the usage of splice, nothing to do with syscall. (I was not using a pipe in between the two file descriptors). Everything is running well now that I'm using splice properly.

Please accept my apologies for the noise.