Ubuntu :: Return Values From System Calls?

Apr 30, 2011

I've implemented a few custom system calls in my Ubuntu kernel, but I'm having some issues with the return values. Each function returns a variety of non-negative integers depending on which error is encountered. However, when I'm testing the system calls, the only negative value that gets returned to the user program is -1, regardless of what I have in the code.

Is there some special path I have to take to get the proper return values?

View 3 Replies


ADVERTISEMENT

Programming :: Real Difference Between System Calls And Normal Function Calls?

Oct 26, 2010

What is the real difference between system calls and normal function calls. Ultimately function calls too would be passed to kernel for some or the other work.

View 7 Replies View Related

Programming :: Else & Return Values?

Oct 12, 2010

i am having two small issues with a function i have made.sorry if it is a mess, i am still learning bash.the first is calling the nonpersistssh function (second line) and assigning the return value to nonpersistdiag.the function returns 1, but nonpersistdiag seems to only contain 0. i am unsure on how to proceed.the second problem is the nested else clause on line 10. it is a syntactical error. how would i declare it correctly?

Code: function endsession(){
nonpersistdiag=$[nonpersistssh]# a function that returns an exit code
sudo /etc/init.d/ssh stop; sshdiag=$?

[code]....

View 6 Replies View Related

Programming :: C Bool Return Values Conventions

Oct 30, 2010

I have a function that returns a boolean value, True of False. Is there any convention whether 0 = False or 0 = True? It should be obvious, 0=False, 1=True. However programs usually return 0 on success and reserve higher numbers for error values. I.e. if the program finishes successfully (function int main() finishes successfully ), it returns 0 - and that contradicts that 0 should be false.

And especially if I want a function to do some computations on parameters passed by reference and return success status. Should it return 1 (true) for success, or should it return 0 for success - like any Unix program does?

Is there any convention for this?

View 1 Replies View Related

Ubuntu :: System To Drop Telemarketer Calls?

Aug 6, 2010

I've been receiving a ton of calls from telemarketers and political callcenters. What would be the simplest way to use Ubuntu to automatically drop calls incoming from blacklisted numbers?

I have Comcast Digital Voice service, which is technically VOIP but I think it interfaces with modems themselves just like any other phone service would.
I have a dedicated Ubuntu server sitting next to a phone jack already, so I'd like to use that if possible.

I've seen FreePBX and Asterisk, and hear that they can do the job. However, I haven't been able to tell just how easily they could be set up. It sounds like they might require me to get rid of all my phones and use soft phones instead... Does anybody know if it is as simple as buying a voice modem and configuring a PBX software to interface with it?

View 2 Replies View Related

Ubuntu Multimedia :: When Connecting Psp System It Calls It 9"e Instead Of PSP Which It Used To In 9.04

Mar 29, 2010

i upgraded to 10.04 and when i connect my psp system it calls it 9"e instead of PSP wich it used to in 9.04. how to rename it?

View 2 Replies View Related

General :: Tracing An User's System Calls?

Mar 27, 2010

I would like to trace a user's activity by monitoring system calls. Is there a way to use strace such that at startup it will begin tracing all system calls? Or is there any other method to automatically trace the system calls used during a user's session automatically without having to call strace manually?

View 6 Replies View Related

General :: Error Checking On System Calls

Sep 19, 2010

I'm new to C language and some help finding places in the following code where a system call is made and error checking is not done. I found one but since I don't know C language at all I'm not exactly sure what else to look for. Link to my file: [URL]...

I found one and added error checking:
if (setoutpipe){
//Changes: Added error checking to the system call close()
//Orginal Code: close(pidefd[1]);
if(close(pipefd[1] != 0){
fprintf(stderr, "Could not close piple.
");
exit(255);
}

View 1 Replies View Related

Programming :: How To Include Variables In System() Calls

Mar 12, 2010

I need to include variables in a system() call. This is that I have:

[code]#include <iostream>
#include <stdio.h>
#include <stdlib.h>
using namespace std;

[Code]....

P.S.: I know this is a pointless redundant program, but it's part of a larger project learning process.

View 10 Replies View Related

Fedora :: Command To Show The Recent System Calls In The OS?

Apr 26, 2011

what is the command to show the recent system calls in the OS?

View 2 Replies View Related

Programming :: Calling System Calls In C Runtime (in The Run-time)?

Sep 23, 2010

I know there is a way to call winapi in runtime in windows. I want to ask how can I call a system call in gcc in runtime (when I don't know what it can be)? I don't mean syscall that I think is for calling only system calls and not library functions.

View 4 Replies View Related

Programming :: Alphabetic Non-repetitive List Of All System Service Calls

Mar 13, 2011

I'm trying to produce a alphabetic, non-repetitive list of all System service calls in all c files located in a folder. Here's what I got so far.
grep -ow '[A-Za-z]*SYS[$][A-Za-z]*' *.c | sort
Which produces all system service calls in alphabetic order I just need to find out how to make it non-repetitive.

View 3 Replies View Related

Programming :: Writing On Keyboard Port Via Inb(), Outb() System Calls?

Apr 5, 2010

I am working with fedora 6 , i386 architecture.I am trying to write on keyboard port via program.On inspation i come to know that 0x0060 to 0xz006f are used for keyboard in linux 2.6 kernel in the i/o space from kernel.

#include<sys/io.h>
#include<stdio.h>
#include</usr/lib/syslinux/com32/include/sys/io.h>
#include<unistd.h>
//#define

[Code]...

View 2 Replies View Related

General :: Log Or Live Data That Discloses The System Calls An Application Makes?

Apr 5, 2011

I want a log or live data that discloses the system calls an application makes. I have used strace but can't find a guide for it that is decent. I'm interested in knowing the calls made after user intervention like opening a menu and so on. If you run (strace application_name) it is static. What good is this? When does strace make this file? When is this log produced?

View 4 Replies View Related

Ubuntu :: Cannot Return Back System

Nov 2, 2010

i made upgrade(not distro) on my ubuntu 10.10. i took very long but i was not concerned. However i opened my laptop again it could not boot normally. Therefore i ran in recovery mode in failsafe graphic it stopped at "running scriptss in rc2.d/ took 2 seconds". I safe my important file from command window in recovery mode but i can not return back my system.

View 9 Replies View Related

Networking :: Privileges Are Required To Change Gconf System Values

Jan 3, 2011

im on ubuntu, and i was trying to change the settings under System->preference->network proxy

When i click apply system wide, it asks me for my root password wich i provide and then it asks me for this other password, with this message: Privileges are required to change gconf system values. What is this? is there a way around it?

View 1 Replies View Related

Programming :: Working With System Call - Read Output And Parse Values

Dec 10, 2010

I have the following code:
Code:
#include <stdio.h>
#include <stdlib.h>
int main() {
system("ps -ef | grep myprocessname");
return 0; }

When I run this program it outputs the following list of running processes:
Code:
root 10279 10275 0 13:02 ? 00:00:00 myprocessname myvar1=value1 myvar2=value2
root 10341 10337 1 13:02 ? 00:00:00 myprocessname myvar1=value1 myvar2=value2

What I want to really do is instead of writing the output to screen I want to read the output and parse the various values value1, value2 etc. What is the best way to do this?

View 4 Replies View Related

Software :: Script Calls Another Script Which Calls 'bash' Inside

Mar 15, 2010

I need to write a script. In which, the 2nd part commands need to run under another bash shell environment.The enter_antoher_bash_env.sh will setup a new shell environment, call "bash". The rest commands need to run under the new env. (I cannot change this script too. )If I run these command one by one manually, it works of course. If I put them into a script, enter_another_bash_env.sh won't return because it calls "bash" command inside.

View 10 Replies View Related

General :: Reboot(LINUX_REBOOT_CMD_RESTART) - Lock Up The System And Does Not Return From The Call?

Jul 8, 2011

I am running an embedded Linux Release 2.4.19-uc0.

I have code in several places that calls

reboot(LINUX_REBOOT_CMD_RESTART)

successfully. I need to put it into a new place in a application running on the system. When I do, it seems to just lock up the system and does not return from the call nor leave me able to Telnet in or Ping or anything. I've tried puttingtrace code in to write info out to a file, but that too is not working (as it never returns from the reboot() call.I don't get any error from reboot(), it just does not return and does not appear to restart the system.

View 3 Replies View Related

Programming :: C - For System Calls, Is Blocking Or Non-blocking Default?

Mar 23, 2010

For system calls, is blocking or non-blocking default in C? Simple question, just am not seeing the answer super quickly.

View 4 Replies View Related

General :: Get The Values For The User Time And System Time For A Process?

Aug 4, 2009

get the values for the user time and system time for a process.i have tried getrusage to get values of ru_utime and ru_stimebut these don't seem to be correct

View 3 Replies View Related

Ubuntu :: Get Work Internet Calls?

Jul 18, 2010

Is it possible to get work internetcalls (form [URL]) on ubuntu?

View 4 Replies View Related

Ubuntu :: Empathy For Video Calls?

Aug 5, 2010

I while back I tried installing Skype form the software centre but for some reason it wouldn't work. Now, with a fresh install of Lucid, I see that Empathy comes pre-installed and allows video chatting. Is it worth setting up a account? Does anyone have experience with Empathy?

View 9 Replies View Related

Ubuntu :: Ekiga Does Not Accept Incoming Calls?

May 14, 2010

After I installed Lucid on my Netbook, I have different problems with ekiga.

First of all, some information about my ekiga account:

In ekiga I created a SIP-Account with a usual landline phone-number, my voip-provider is 1&1 (in Germany). In ekiga the account is named "Standard%limit", because I cannot register my sip-account without the "%limit". If I leave the "%limit" out, I get the message "Could not register (Forbidden)", but here on ubuntuforums (or maybe on launchpad) I read about the "%limit" as a workaround. Maybe it has something to do with my problem, I don't know.

Now, this is my problem:

Ekiga does not accept incoming phone calls after a few minutes after launching ekiga. Well, let me describe it this way: Usually ekiga plays a ringtone and shows a message whenever there is an incoming call. However, ekiga only behaves as described and expected just after launching ekiga. A few minutes later, lets say five or ten minutes, ekiga does not accept incoming calls anymore. I tested it with my mobile phone - when I call myself on the landline with my mobile phone, I expect ekiga to play the ringtone and show a message that there is an incoming call. However, ekiga does not do anything and after a few seconds the call is terminated automatically. But it is not the same as if ekiga is not running because if ekiga is not running I get the message that the subscriber is not available.

View 1 Replies View Related

Ubuntu :: Command To Log Method Calls While Doing 'make'

Nov 19, 2010

I am building an android, from the source using make command. I want to achieve simple logging while this make is happening.

Aim:

I want to look/log for internal system calls that are being made after i do 'make' command in bash terminal. So that after the make is done, i can look and study the internal method/file calls made while make was happening. In this way i will come to know how the actual building process works.

View 1 Replies View Related

Ubuntu :: Route And Monitor Phone Calls?

Feb 21, 2011

I would be getting calls from customers who'd require the service I provide. The issue here is I may not always be around to take the calls so I was thinking if there is way by which I can connect my phone to my ubuntu desktop and keep a track of number of calls and simultaneously record them.

View 1 Replies View Related

Ubuntu :: Use The Video Calls With Skype - Person Can See Me But I Cant See Them

Apr 5, 2011

I am trying to use the video calls with skype. The person can see me but I cant see them or myself on the video call box. I have tried the download version from skype and inside my ubuntu software center and each had the same problem.

View 1 Replies View Related

Ubuntu Networking :: Can I Make Calls Using Dialup Modem

Mar 12, 2010

I have a dial-up modem in my Laptop.
Also I have a Dial-up line[Base Phone].
Can I make calls from Dialup modem [Making & Answering calls]?

View 5 Replies View Related

Ubuntu :: Pidgin And Make Audio Calls Over SIPE

Mar 17, 2010

I have been trying to figure out how to make audio calls in Pidgin. I have enabled the "Video/Voice Settings" plug-in, but do not get any options any where to initiate a voice call. I am trying to do voice over SIPE to Office Communication Server and I am not 100% sure if pidgin-sipe supports audio (I have looked around but can't find any information on features).

View 1 Replies View Related

Ubuntu Networking :: Make Calls Over Net With Pstn Phone

Jun 13, 2010

I heard it possible to make a call from a pstn phone through the internet to a pstn phone elsewhere in the world. The caller pstn phone connects to something called a pbx[dunno what it is] and a linux box running some software[dunno what it is either] connects to the internet.How do I make that work?

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved