New answers tagged

0

You need to build or install a uClibc toolchain and compile/link your programs with that. You do not compile them with the standard gcc/make/.... Do I really need to build a uClibc toolchain?


0

My guess is that you don't have the correct dynamic linker on the Busybox system. On your Arch system do this: ldd ./simplestprogram I imagine ldd will give you output similar to this: linux-vdso.so.1 => (0x00007fff9b34f000) libc.so.6 => /lib64/libc.so.6 (0x0000003b19e00000 /lib64/ld-linux-x86-64.so.2 (0x0000003b19a00000) That last line, ...


0

The actual type behind mode_t and how it encodes information is implementation defined. The only thing that's certain is that it's a bitmask. To work with st_mode, use the flags and macros defined in the sys/stat.h header. For a list of those defines, consult: man 2 stat If you truly need to know what each bit represents, or are simply curious, read the ...


0

You might start rummaging around in LWN (look for the kernel page, search around there) and Kernel Newbies should have some details. The Linux networking stack is complex, hooking into it isn't exactly trivial. Giving such an assignment, which is an absolutely horrible idea (you won't learn anything useful about how to program in-kernel, neither how to write ...


0

Short answer, yes. Your biggest mistake is that you should be using strcmp or strncmp to properly compare strings in C. Bonus points: loop through argv[] and use printf to display each element to see for yourself what gets placed where.


1

That is because you can't do string comparison in C with == or != because those compare the base address, rather than the actual content. To properly compare the string in C you have to use strcmp.


1

1ms is plenty to generate a few Ethernet frames, but on a typical Linux system, you can't count on not having the occasional pause. Even if you make your process high-priority, I don't think you can expect to always make a 1ms deadline. RTLinux combines a real-time operating system with Linux. Linux runs as a non-real-time-priority task in the real-time ...


1

For instance, could I just use the cutime and cstime values of the namespace's init process to get total CPU usage? That will only include the time of the waited-for (and thus terminated) children and descendants (or ripped-processes in the case of init). So you'll only get the time for the dead orphans. If you compute the sum of the cutime and cstime ...


0

Unless you are using a very esoteric distribution, Linux, or any common derivative of a UNIX system, is not real time. If you are looking into time slices like 1 milisecond without any exceptions, you need to look elsewhere, for a real time OS. Whatever anyone can tell you to do on Linux is on best effort basis and if there is a contention on CPU, I/O or any ...


0

You could use diff to generate a patch with new, old and conflicting files. diff -Naur Libc-825 Libc-1044 The flags state -N treat missing files as new, -a all files are text, -u show lines before and after diff for easier identification and -r recursive. You can then apply the patch to the old directory and get the merged results.


2

Assume the file1 in your example was created yesterday. If you do not use the -p option, the creation date for file2 will be today and right now. If you use -p option, file2 will look like it was created yesterday. And that is just for the timestamp. If you are copying the file as someone other than the creator of the file, it will assume your identity as an ...


0

There is no requirement for the certification path for the server authentication and the client authentication to be the same one. All that needs to happen for server authentication is that the server presents a certificate (along with any subordinate/intermediate CA certificates) that chains up to a trust anchor (in practice, a root CA certificate stored ...


0

I don't know any tool that does this job automatically, probably one needs to do it manually. First lets find the path from where gcc is including files: $ gcc -v (...) #include <...> search starts here: /usr/lib/gcc/i686-pc-linux-gnu/4.9.3/include /usr/lib/gcc/i686-pc-linux-gnu/4.9.3/include-fixed /usr/include End of search list. Now one can ...


2

POSIX guarantees you that a successful, uninterrupted sleep will sleep at for least as long as you request: http://pubs.opengroup.org/onlinepubs/009604599/functions/sleep.html On Linux, it may take longer due to 1) rounding 2) waiting on the scheduler to put the process/thread on the CPU 3) time spent in a stopped state: ...


5

The definition of sleep(3) allows for the call to return before, at, or after the time specified: DESCRIPTION sleep() makes the calling thread sleep until seconds seconds have elapsed or a signal arrives which is not ignored. So we have these possible scenarios The call is interrupted with an uncaught signal. sleep() returns immediately and ...



Top 50 recent answers are included