Does Linux provide an exception handling in C without resorting to C++? Or, what might be the best way to implement such an exception handling? The goal is to avoid to check return codes for every function called, but do something like in C++ that is thread safe and easily portable.
...
Hi,
We do have a client software which communicates to a server. On every start of the client the user has to put in username/password. Now it would be nice if the user did login once (assuming he is still in the same operating system session) subsequent logins wouldn't require a password. (Sidenote: the security requirements aren't rea...
I have a thread that sits in a blocking recv() loop and I want to terminate (assume this can't be changed to select() or any other asynchronous approach).
I also have a signal handler that catches SIGINT and theoretically it should make recv() return with error and errno set to EINTR.
But it doesn't, which I assume has something to do ...
In assembly how do i Print the values of an Array?
Now in this program I also have to print its values < Index entered in by the user.
.intel_syntax noprefix
.include "console.i"
.data
index: .long 0
array: .long 1,2,3,4,5,6,7,8,9,10,11,12 # Array initialized
value: .long 0
.text
ask1: .asciz "Enter an...
Hi,
i am working on ipsecconf command ,by using ipsecconf -a we can Add the IPsec policy to the system as specified by each entry in the file.now i want equivalent command in linux.
eg of ipsecconf in solaris:
$ipsecconf -a
$ ipsecconf -l (Listing of the internal system policy table)
#INDEX 9
{ rport telnet dir out } ipsec ...
Hi,
We are setting up two server systems. One of which will host a 3rd party application which will by default save certain data on a local folder:
/opt/application/common/recordings
How do I create a "writable share" on the other server (with appropriate permissions), so that all these files from the first server are saved on the...
Hello.
I need to list a directory recursively but I want to skip subdirs that were already mounted.
There are 2 cases:
a) a filesystem was mounted twice, like in this example:
"/dev/sda2" was mounted on "/mnt/mnt_point1"
"/dev/sda2" was mounted on "/mnt/mnt_point2"
I want to list "/mnt" but descend only in "/mnt/mnt_point1"
b) part ...
Hello I'd like to list all real users on Linux/*nix and it's data. I probably need to parse /etc/passwd and /etc/shadow and check if user have password.
The problem is that is not cross-platform (on *BSD there is no /etc/shadow). Is there any cross-platform library/command I can use?
...
I thought this would be easy to find, but a google search has been very unhelpful. Is there a simple api to change the mouse cursor in your X window? (I know in windows you can just call "SetCursor")
...
How to display beginning sector of each partition in ubuntu ?like in windows there is an API to call disk structure in c/C++ ..
any suggestions will be help full.
...
I am using getdomainname() and gethostbyname() to try to get the domain of the computer so I can show the correct information on my program. However sometimes these functions don't return the correct information.
Is there any other way (in plain C) to get the domain name in Linux?
Edit: just to make it a bit more clear: I want to check...
We have a program, written in C, that uses RPC to communicate with another program (also written in C) on the same Linux server (in some production setups, the second C program would on another machine, therefore RPC instead of IPC).
When called from other C programs, CRON or the command line, it works as expected and has been doing so ...
Hello! I am looking for a way to make a program in C or C++ that detects if there was any files altered, renamed, moved or deleted in a specified directory for Linux systems. Is there a way to do that?
...
I'm trying to use a socketpair to have a parent process provide input to a child process that execs a different program (e.g., grep) and then read the resulting output. The program hangs in the while loop that reads the output from the program that the child execs.. The child dupes stdin and stdout on to its end of the socketpair and the...
I have a pointer and I want to check if the referenced memory is readable, writeable and/or executable. How can I do this?
...
I'm in a small distributed team using Mercurial for a central repository. We each clone it via ssh onto our own linux boxes. Our intent is to review each others' work before pushing changes up to the central repository, to help keep central's tip clean. What is a good way to share code between developers on different linux boxes? I'm new...
I'm getting to know Mono development in Linux, in baby steps. I'm trying to call Linux C libraries. This page, in theory, tells me how, but when I type the code below in MonoDevelop 2.2.2 (Fedora 13), I get a "Parsing Error (CS8025)" in "private static extern int getpid();". Moreover, the help system doesn't work.
EDIT: I just had to mo...
I don't know if this is a dumb question or not but again as my professor says if you have doubts then clear them . What is the difference between Linux text mode and windows command prompt (cmd). I know both windows and Linux are different Operating Systems but when you look at the commands, some of the commands are common For Example cd...
Hi All,
Question in one sentence: How can I compile code for AIX using G++ on Ubuntu? (Assuming it is possible)
I hope that it is as simple as adding an option to the make file to specify target processor. I am a novice when it comes to most things compiler related.
Thank you in advance.
...
I have a client-server application that needs to be secured by adding server-side authentication. The client user will already be authenticated to LDAP (Active Directory) and will be running a C# GUI. The client connects to a server on a Linux box which uses Centrify for LDAP authentication. As I understand things, the two need to neg...