C is a general-purpose computer programming language used for operating systems, games and other high performance work and is clearly distinct from C++. It was developed in 1972 by Dennis Ritchie for use with the Unix operating system.
1
vote
2answers
50 views
I can not get my Realtek 8723 driver source compiled
I have a Lenovo IdeaPad Yoga 13. WLAN won't work out of box with fedora 18. So I googled around and found this 2 links:
...
0
votes
0answers
29 views
dynamic pool of process C [migrated]
I'm writing program in UNIX on C. I have to write client-server(TCP) program on sockets. Client sends some information and server answer. No matter what client sends or receives because I successfully ...
-3
votes
2answers
51 views
Using file system call
I'm trying to learn system calls for open,write and close a file.
I use this sample and the result is:
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
Here's my program:
...
0
votes
1answer
28 views
Understanding a XINU system call - getstk.c [closed]
I am having trouble conceptually understanding what is going on towards the end of this system call, and why. I understand the getstk.c method returns the highest memory address of available space, ...
2
votes
2answers
217 views
Why read() is slower than getc()? [closed]
Why is read slower than getc?
For example, this:
for (;;) {
chr++;
amr=read(file1, &wc1, 1);
amr2=read(file2, &wc2, 1);
if (wc1 == wc2) {
if ...
-2
votes
0answers
41 views
getc() convert to syscall read() [closed]
I'm writting utility like cmp in UNIX using system calls.
Found source code for Solaris. Started to convert fopen into open, etc.
When I almost finished, I found the getc() function and was upset ...
-1
votes
0answers
31 views
Client-Server with unnamed pipes and select [closed]
I try to write simple client-server program using fork(), pipe() and select(). Parent process is a server, which select pipe with data from client by FD_ISSET and write data to other clients. And ...
0
votes
0answers
32 views
GCC Constructor & Link order, Are they have relation? [migrated]
I have to write this question, I have try a lots to find the reason.
There is a.c:
UTEST_BEGIN()
UID(a_test)
{
printf("a test");
return true;
}
UTEST_END(a)
b.c is simlar:
UTEST_BEGIN()
...
1
vote
2answers
67 views
Monitoring script started by rc.local
We have a C program which is started using rc.local´. We added a line like this:
/usr/local/bin/pc
to the rc.local file. pc is a compiled C program. Everything is working fine at the moment. What ...
2
votes
0answers
20 views
Getting live info from /dev/input [migrated]
I am unsure if this is the correct place for this question. I am attempting to obtain the axis position values from a joystick /dev/input/js0 on my system. If I run jstest /dev/input/js0 it will give ...
0
votes
1answer
44 views
USB-Serial Driver(Exar Xr21v1414) Run Error
I'm currently trying to run the bellow driver in linux-3.8.3 on Exar xr21v1414
http://www.exar.com/connectivity/uart-and-bridging-solutions/usb-uarts/xr21v1410,
but when i install the driver ...
0
votes
0answers
10 views
Why is data sent across the network converted to network byte order? [migrated]
I'm not sure how to use hton(). The theory is that any data sent over the network should be in network byte (i.e. big-endian) format. Suppose client A supports big-endian and B supports little-endian. ...
1
vote
1answer
65 views
How to explicitly load shell interpreter in a C program
I want to create an executable script which is not readable/writable
However since an interpreter needs to read this file it is not possible to do so directly. Therefore I wanted to know if I could ...
0
votes
0answers
36 views
Creating simple kernel module [migrated]
I've just started learning linux kernel modules and trying to write simple Hello world program.
So mymod.c:
#include <linux/module.h>
#include <linux/kernel.h>
MODULE_LICENSE("GPL");
...
0
votes
1answer
23 views
Can a GTK applet widget be instantiated through dbus?
I just posted this:
#274616: “Simple” gnome applets in Unity - stickynotes
... where I could instantiate a Gnome 2 bonobo applet in a standalone window,
... using ...
-1
votes
2answers
35 views
Why rsh not opens and reads PAM modules and limits.conf?
I am working on a project, that uses rsh utility for remote connection.
But my project needs some extra features for that, so I add that features.
Till now, all the things are going fine. But when I ...
2
votes
1answer
52 views
Make Completion Progress Script
Any time I'm executing a build process that takes several hours, I inevitably stare at my terminal and wonder, "how much longer?" Sometimes, I manually pick up on some pathname echoed to the terminal ...
-1
votes
3answers
152 views
telnet implementation using C [closed]
The program in general is I want to implement telnet program.
On the client side user send its logging name and password, and if it is correct he starts to send commands to the server
On the Server ...
0
votes
2answers
57 views
Which process updates /proc/scsi/scsi?
I wrote C that displays info about my hardware on ubuntu. Now I wonder how I can make it more flexible such as querying the hardware directly instead of the file the os updates. So I think I can look ...
1
vote
0answers
65 views
mod_rewrite: undefined symbol: lstat error
I compiled the mod rewrite for apache (version 1.3.0) however, when I try to run the server I have this error about mod_rewrite:
Syntax error on line 27 of /home/myuser/apache/etc/httpd.conf:
Cannot ...
3
votes
1answer
102 views
Send log messages to a different location
I want to send messages from C program and from Perl script to a file (for example, /var/log/my_log). I don't have access to the syslog daemon configuration, so I think in launch a differente syslog ...
-3
votes
2answers
61 views
Which Linux distro/mode offers lowest interference when running your own applications?
I'm interested in a Linux distro to build C projects and test their behavior in a very predictable and controlled environment. I'm especially concerned about letting the scheduler deal as much as ...
0
votes
1answer
72 views
Having trouble executing a compiled C program
I am running an Ubuntu v10.04 through VirtualBox. To test the persistence of files I create in the virtual machine, I wrote a very basic C program. When I shutdown the virtual machine and restart it, ...
0
votes
0answers
71 views
'dereferencing pointer to incomplete type' in compiling FreeBSD 4.2 custom system call - FreeBSD [closed]
I already posted this question on Stack overflow, but no luck there:
http://stackoverflow.com/questions/14784525/dereferencing-pointer-to-incomplete-type-in-compiling-freebsd-custom-system-caF
I am ...
-1
votes
2answers
105 views
Do BSD sockets give better performance than others eg. POSIX and other? [closed]
I am searching cross-platform techniques to write client-server applications on Mac. I used BSD sockets, Cocoa APIs but I need to know which would be better at performance.
2
votes
3answers
116 views
Linux GCC compiler options
I have recently started using Linux as a tool for programing. In my book, I have seen that the GCC is used with 2 options: -g and -o. Now, I know that -o is to set a filename, but what is the purpose ...
0
votes
0answers
51 views
explain the program in advanceunix? [closed]
I understand the fork concept. I'm trying to solve the following problem.
I have to write a program that forks. The parent process gets a valid Unix command from the user, and passes it to the child. ...
1
vote
0answers
117 views
Conky - string formatting
I have conky the record:
${color lightblue} Down: ${downspeed wlan0} Up: ${upspeed wlan0}
Conky prints link speed, but the text moves:
Down: OB Up: OB
Down: 60B Up: 60B
Down: 148B Up: 148B
...
0
votes
1answer
164 views
How do I write a login daemon?
There are many guides to the steps for correctly launching a daemon process, such as Stevens' chapter in Advanced Programming in the UNIX Environment. There is less agreement on what steps should be ...
1
vote
1answer
109 views
Linux kernel 3.2 syscalls
Just trying to get the assembler instructions for <__execve> of the code below because i want to build the shell spawn opcode list:
#include <stdio.h>
int main()
{
char *happy[2];
...