C programming System calls

Ok I am starting to program in C and I would like to make useful apps
but I don't know how to call other programs within linux from C
I'm looking for guides that help on linux "C" programming.
I've tried some guides I googled but I tried their examples and don't get anything
they appear obsolete (1996 or 1999)
Guide I found
Any sugestions?
Thanks

toofishes wrote:Note that calling other programs is not a common occurrence for C programs...nor is that a "system call". A system call is calling a kernel-provided function such as stat or access, not calling another user-space program on the system.
U call other programs with a system call, u can open a file and do operations on it with system calls too.
What he want is a GUI like gtk or a framework

Similar Messages

  • System call failed. Error 2 (The system cannot find the file specified. ) in execution of system call 'CreateProcessAsUser' with parameter ( , NULL,  Program Files/sapinst_instdir/BS2011/ERP606/AS-ABAP/SYB/HA/DB, &StartupInfo, &ProcessInfo),

    Dear All,
    I am getting a below error while doing ehp6 installation on sybase (high availbility )
    can any one help me on this..?
    An error occurred while processing option SAP Business Suite 7i 2011 > Enhancement Package 6 for SAP ERP 6.0 > SAP Application Server ABAP > SAP ASE > High-Availability System > Database Instance( Last error reported by the step: System call failed. Error 2 (The system cannot find the file specified. ) in execution of system call 'CreateProcessAsUser' with parameter ( , NULL,  Program Files/sapinst_instdir/BS2011/ERP606/AS-ABAP/SYB/HA/DB, &StartupInfo, &ProcessInfo), line (646) in file (d:\depot\bas\720_rel\bc_720-2_rel\gen\optu\ntamd64\ins\sapinst\impl\src\syslib\synxcchapp.cpp), stack trace: d:\depot\bas\720_rel\bc_720-2_rel\gen\optu\ntamd64\ins\sapinst\impl\src\ejs\ejscontroller.cpp: 181: EJSControllerImpl::executeScript() d:\depot\bas\720_rel\bc_720-2_rel\gen\optu\ntamd64\ins\sapinst\impl\src\ejs\jsextension.hpp: 1059: CallFunctionBase::call() d:\depot\bas\720_rel\bc_720-2_rel\gen\optu\ntamd64\ins\sapinst\impl\src\osmod\iaxxbprocess.cpp: 423: CIaOsProcess::start_impl() d:\depot\bas\720_rel\bc_720-2_rel\gen\optu\ntamd64\ins\sapinst\impl\src\syslib\synxcchapp.cpp: 238: CSyChildApplicationImpl::start(false) d:\depot\bas\720_rel\bc_720-2_rel\gen\optu\ntamd64\ins\sapinst\impl\src\syslib\synxcchapp.cpp: 262: CSyChildApplicationImpl::doStart() .). You can no
    Regards,
    Letz..

    Hello Mauricio.
    Thanks
    Two Thinks:
    1.- This error appears precisely in the process of creating SAP users including you mention sidadm:
          A.- Execute sapinst
          B.- Installation option is chosen
                SAP NetWeaver CE Production Edition
                        Installation Options
                            High-Availability System
                                  Central Service  Instance (SCS)
           c.- System ID, Next and appear message error
    2.- However, the user manually create sidadm, I gave the permissions you indicate, and the error message is the same
    Thanks

  • How to access system calls from java program?

    i am having a doubt regarding accessing system calls from a Java program like accessing unix system calls from a c program.

    Runtime.getRuntime().exec("line command here");
    example:
    Runtime.getRuntime().exec("ls -la");

  • I can not download any files, i think i by misstake put the download manager in the trash and then deleted it, what should i do? I am not so shore what the program is called in English( in Swedish:filhämtare) but it looks like a little grey box

    Hi, i really need help... I think i by accident deleted the "download manager" i´m not shore what the program is called in English ( Swedish : filhämtaren), but its symbol looks like a grey little box and when you download a file it appears on a list and is then saved in this program. I don`t know how i didn´t see it in the trash, but somehow i deleted this program by mistake. And as a consequence i can no longer open/download any files. I just got my macbook pro and i do love the system but i am now unsure about what i should do with this problem since i am not that terribly good with computers.... Is there any way you can fix this?

    soffi h wrote:
    Hi, i really need help... I think i by accident deleted the "download manager" i´m not shore what the program is called in English ( Swedish : filhämtaren), but its symbol looks like a grey little box
    If it looks like this:
    It's called an "installer.app"
    You can custom install the "installer.app" directly from your System DVD that originally came w/your computer.  It will be either inside the "Bundled Software" folder or inside the "Applications" folder.

  • Correct Forum? CGI and Server behaviour on Solaris at system()-call

    Hi to you all,
    Do not know if i am in the correct forum, but maybe it is a Webserver problem.
    I have Sun ONE Webserver 6.1 running on Solaris.
    Craete some CGI`s in C.
    Now I have a problem with one CGI, which have to call a Shellscript via system() call.
    The Client just calls the CGI with some parameters, which will write the informations in a file with some additional informations from a database, after that, the script should be startet and do some printjobs in the background.
    The CGI and the Shell-script is working fine. My Problem is, that the system() call always waits, until the ShellScript has finished, so the Webserver send the "data successful written" site after a couple of minutes, it should send it immeditatly to the client, so the session is closed.
    I have tried to put the shellscript in background with "&", also with nohup and a second shell script which justs starts the first script, also with all combinations of nohup and "&" for background process.
    also i tried with "pclose(popen(SCRIPT,"W");" to call the script, it is always the same, the session will close only, when the script has been finished.
    In an other Forum I found an entry, that , however, IPlanet webserver always will do this in this way. The session will be closed, when all called processes has benn fisnished.
    Any Ideas to solve my problem?

    The web server reads from the CGI program's stdout. It knows the HTTP response is complete when the CGI program closes its stdout.
    When you call system(), the child process inherits the CGI program's stdout and keeps it open until it finishes. If you want the child process to run asynchronously from the HTTP response, you should give the child process a new stdout with > /dev/null. (You'll still need to place the child process in the background with &.) Alternatively, you can fork(), close(1), then exec().

  • Closing error message when external program is called?

    Hello,
    I am developing a test for a c++ program i have made.
    My test program will be called a few thousand times with different input files.
    As I know it will crash in several cases I want to automatically close the error dialog.
    The error dialog is an application error dialog telling some debug info and says
    - Click OK to terminate
    - Click Cancel to debug
    For my test program developing I have created a c++ program that always crashes if it gets any input parameters.
    I have made a very simple JAVA program to call my c++ program.
    //StreamGobbler left out for shorter post
    import java.io.IOException;
    public class MainTester {
         public static void main(String[] args) {
              String[] testAndArgs = new String[2];
              testAndArgs[0] = "test.exe";
              testAndArgs[1] = "crash";
              Runtime rt = Runtime.getRuntime();
              Process proc = null;
              try {
                   proc = rt.exec(testAndArgs);
              } catch (IOException e) {
                   e.printStackTrace();
                   System.exit(1);
              try {
                   StreamGobbler errorGobbler = new StreamGobbler(proc
                             .getErrorStream(), "ERR");
                   StreamGobbler outputGobbler = new StreamGobbler(proc
                             .getInputStream(), "OUT");
                   errorGobbler.start();
                   outputGobbler.start();
              } catch (Throwable t) {
                   t.printStackTrace();
    }So I have tried proc.destroy() and if I look in process explorer test.exe is terminated.
    I also tried rt.exit(1) and then jawaw.exe is terminated but test.exe lives on under explorer.exe instead of javaw.exe.
    So if I first run proc.destroy() and then rt.exit(1) both javaw.exe and test.exe is terminated but the error dialog lives on.
    Any suggestions, are this a lost cause?

    I have also seen this once on my Windows machine but it disapeard without any efforts from my side.... I guess, it was due to bad state of my macine.
    Would love to know more about this problem..

  • Exchange 2007 SP3 Install on 2008R2 Fails with "The data passed to a system call is too small"

    I'm installing Exchange 2007 SP3 onto Server 2008 R2. I have run this install in compatibility mode and in normal install mode with the same results. Error code 3221684346: The data area passed to a system call is too small. I am installing directly from
    the SP3 files, this is not an upgrade. What do I have to do to get this to work?
    [2/15/2011 7:24:18 AM] [2] Interpreting line <CreateSecureKey:MSExchangeIS\ParametersPrivate> -- ID:31259 --
    [2/15/2011 7:24:18 AM] [2]  CInsParser::ScProcessLine (f:\08.03.0083\sources\dev\admin\src\libs\exsetup\hiddenw1.cxx:1199)
               Error code 0XC007007A (122): The data area passed to a system call is too small.
    [2/15/2011 7:24:18 AM] [2] Processing file 'C:\Exchange Server\Setup\data\mdb_reg.ins', at or near line 77 (CreateSecureKey:MSExchangeIS\ParametersPrivate) -- ID:31111 -- CInsParser::ScProcessLine (f:\08.03.0083\sources\dev\admin\src\libs\exsetup\hiddenw1.cxx:488)
               Error code 0XC007007A (122): The data area passed to a system call is too small.
    [2/15/2011 7:24:18 AM] [2] Registry file name: 'C:\Exchange Server\Setup\data\mdb_reg.ins' CRegistryManager::ScProcessFile (f:\08.03.0083\sources\dev\admin\src\udog\setupbase\tools\regmgr.cxx:125)
               Error code 0XC007007A (122): The data area passed to a system call is too small.
    [2/15/2011 7:24:18 AM] [2] Filename = 'C:\Exchange Server\Setup\data\mdb_reg' CBaseAtom::ScRunRegistryFile (f:\08.03.0083\sources\dev\admin\src\udog\setupbase\basecomp\baseatom.cxx:1379)
               Error code 0XC007007A (122): The data area passed to a system call is too small.
    [2/15/2011 7:24:18 AM] [2] Leaving CBaseAtom(Information Store Service)::ScRunRegistryFile
    [2/15/2011 7:24:18 AM] [2] Filename = 'C:\Exchange Server\Setup\data\mdb_reg' CBaseAtom::ScAddRegistryKeys (f:\08.03.0083\sources\dev\admin\src\udog\setupbase\basecomp\baseatom.cxx:1249)
               Error code 0XC007007A (122): The data area passed to a system call is too small.
    [2/15/2011 7:24:18 AM] [2] Leaving CBaseAtom(Information Store Service)::ScAddRegistryKeys
    [2/15/2011 7:24:18 AM] [2]  CAtomBaseMDB::ScAddRegistryKeys (f:\08.03.0083\sources\dev\admin\src\udog\exsetdata\components\server\a_basemdb.cxx:132)
               Error code 0XC007007A (122): The data area passed to a system call is too small.
    [2/15/2011 7:24:18 AM] [2] Leaving CAtomBaseMDB::ScAddRegistryKeys
    [2/15/2011 7:24:18 AM] [2]  CBaseAtom::ScAdd (f:\08.03.0083\sources\dev\admin\src\udog\setupbase\basecomp\baseatom.cxx:639)
               Error code 0XC007007A (122): The data area passed to a system call is too small.
    [2/15/2011 7:24:18 AM] [2] Leaving CBaseAtom(Information Store Service)::ScAdd
    [2/15/2011 7:24:18 AM] [2] Service = 'MSExchangeIS' CBaseServiceAtom::ScAdd (f:\08.03.0083\sources\dev\admin\src\udog\setupbase\basecomp\basesvcatom.cxx:203)
               Error code 0XC007007A (122): The data area passed to a system call is too small.
    [2/15/2011 7:24:18 AM] [2] Leaving CBaseServiceAtom(Information Store Service)::ScAdd
    [2/15/2011 7:24:18 AM] [2] mode = 'Install' (61953) CBaseAtom::ScSetup (f:\08.03.0083\sources\dev\admin\src\udog\setupbase\basecomp\baseatom.cxx:535)
               Error code 0XC007007A (122): The data area passed to a system call is too small.
    [2/15/2011 7:24:18 AM] [2]  ScSetupAtom (f:\08.03.0083\sources\dev\admin\src\udog\exsetdata\exsetds.cxx:897)
               Error code 0XC007007A (122): The data area passed to a system call is too small.
    [2/15/2011 7:24:18 AM] [2] Leaving ScSetupAtom
    [2/15/2011 7:24:18 AM] [2] [ERROR] An error occurred. The error code was 3221684346. The message was The data area passed to a system call is too small..
    [2/15/2011 7:24:18 AM] [1] The following 1 error(s) occurred during task execution:
    [2/15/2011 7:24:18 AM] [1] 0.  ErrorRecord: An error occurred. The error code was 3221684346. The message was The data area passed to a system call is too small..
    [2/15/2011 7:24:18 AM] [1] 0.  ErrorRecord: Microsoft.Exchange.Management.Deployment.ExsetdataException: An error occurred. The error code was 3221684346. The message was The data area passed to a system call is too small..
    [2/15/2011 7:24:18 AM] [1] [ERROR] An error occurred. The error code was 3221684346. The message was The data area passed to a system call is too small..
    [2/15/2011 7:24:18 AM] [1] Setup is halting task execution because of one or more errors in a critical task.
    [2/15/2011 7:24:18 AM] [1] Finished executing component tasks.
    [2/15/2011 7:24:18 AM] [1] Ending processing.
    [2/15/2011 7:42:08 AM] [0] End of Setup
    [2/15/2011 7:42:08 AM] [0] **********************************************

    I would probably rebuild the host machine. The Exchange installation should occur without any issues, and where a problem does occur that can be an indication of a more widespread problem. Rebuild the machine, reinstall the prerequisites and try again.
    Simon.
    Simon Butler, Exchange MVP
    Blog |
    Exchange Resources | In the UK?
    Hire Me.
    Hello Poster.
    I am having the same issue, however it is most likely NOT a host box problem. The above advice is not a fix. I have 3 servers that are cloned with the same setup. 2 were fixed by doing the Vista compatibility trick, this one gave a different error (which
    happened to be the same as above). This org was a 5.5 to 2000. to 2003 coexistence with 2007 currently(because the mailbox role won't install). It has something to do with AD or permissions. Server 2008 r2 inherently has problems installing exchange.
    Example, having to use vista compatibility to get the mailbox role to install. SP2 patch gives the same error to some people, and also doesn't upgrade the mailbox role properly in some cases. Some people have had luck restarting the IIS admin service, but
    that did not solve my copy of this error. I will repost here if I find a solution to this issue...
    Same exact setup log for me as well.
    [3/4/2011 10:45:51 AM] [2] Interpreting line <OpenMachineKey:SYSTEM\CurrentControlSet\Services> -- ID:31259 --
    [3/4/2011 10:45:51 AM] [2] Interpreting line <CreateSecureKey:MSExchangeIS\ParametersPrivate> -- ID:31259 --
    [3/4/2011 10:45:51 AM] [2]  CInsParser::ScProcessLine (f:\08.03.0083\sources\dev\admin\src\libs\exsetup\hiddenw1.cxx:1199)
               Error code 0XC007007A (122): The data area passed to a system call is too small.
    [3/4/2011 10:45:51 AM] [2] Processing file 'C:\Program Files\Microsoft\Exchange Server\Setup\data\mdb_reg.ins', at or near line 77 (CreateSecureKey:MSExchangeIS\ParametersPrivate) -- ID:31111 -- CInsParser::ScProcessLine (f:\08.03.0083\sources\dev\admin\src\libs\exsetup\hiddenw1.cxx:488)
               Error code 0XC007007A (122): The data area passed to a system call is too small.
    [3/4/2011 10:45:51 AM] [2] Registry file name: 'C:\Program Files\Microsoft\Exchange Server\Setup\data\mdb_reg.ins' CRegistryManager::ScProcessFile (f:\08.03.0083\sources\dev\admin\src\udog\setupbase\tools\regmgr.cxx:125)
               Error code 0XC007007A (122): The data area passed to a system call is too small.
    [3/4/2011 10:45:51 AM] [2] Filename = 'C:\Program Files\Microsoft\Exchange Server\Setup\data\mdb_reg' CBaseAtom::ScRunRegistryFile (f:\08.03.0083\sources\dev\admin\src\udog\setupbase\basecomp\baseatom.cxx:1379)
               Error code 0XC007007A (122): The data area passed to a system call is too small.
    [3/4/2011 10:45:51 AM] [2] Leaving CBaseAtom(Information Store Service)::ScRunRegistryFile
    [3/4/2011 10:45:51 AM] [2] Filename = 'C:\Program Files\Microsoft\Exchange Server\Setup\data\mdb_reg' CBaseAtom::ScAddRegistryKeys (f:\08.03.0083\sources\dev\admin\src\udog\setupbase\basecomp\baseatom.cxx:1249)
               Error code 0XC007007A (122): The data area passed to a system call is too small.
    [3/4/2011 10:45:51 AM] [2] Leaving CBaseAtom(Information Store Service)::ScAddRegistryKeys
    [3/4/2011 10:45:51 AM] [2]  CAtomBaseMDB::ScAddRegistryKeys (f:\08.03.0083\sources\dev\admin\src\udog\exsetdata\components\server\a_basemdb.cxx:132)
               Error code 0XC007007A (122): The data area passed to a system call is too small.
    [3/4/2011 10:45:51 AM] [2] Leaving CAtomBaseMDB::ScAddRegistryKeys
    [3/4/2011 10:45:51 AM] [2]  CBaseAtom::ScAdd (f:\08.03.0083\sources\dev\admin\src\udog\setupbase\basecomp\baseatom.cxx:639)
               Error code 0XC007007A (122): The data area passed to a system call is too small.
    [3/4/2011 10:45:51 AM] [2] Leaving CBaseAtom(Information Store Service)::ScAdd
    [3/4/2011 10:45:51 AM] [2] Service = 'MSExchangeIS' CBaseServiceAtom::ScAdd (f:\08.03.0083\sources\dev\admin\src\udog\setupbase\basecomp\basesvcatom.cxx:203)
               Error code 0XC007007A (122): The data area passed to a system call is too small.
    [3/4/2011 10:45:51 AM] [2] Leaving CBaseServiceAtom(Information Store Service)::ScAdd
    [3/4/2011 10:45:51 AM] [2] mode = 'Install' (61953) CBaseAtom::ScSetup (f:\08.03.0083\sources\dev\admin\src\udog\setupbase\basecomp\baseatom.cxx:535)
               Error code 0XC007007A (122): The data area passed to a system call is too small.
    [3/4/2011 10:45:51 AM] [2]  ScSetupAtom (f:\08.03.0083\sources\dev\admin\src\udog\exsetdata\exsetds.cxx:897)
               Error code 0XC007007A (122): The data area passed to a system call is too small.
    [3/4/2011 10:45:51 AM] [2] Leaving ScSetupAtom
    [3/4/2011 10:45:51 AM] [2] [ERROR] An error occurred. The error code was 3221684346. The message was The data area passed to a system call is too small..
    [3/4/2011 10:45:51 AM] [1] The following 1 error(s) occurred during task execution:
    [3/4/2011 10:45:51 AM] [1] 0.  ErrorRecord: An error occurred. The error code was 3221684346. The message was The data area passed to a system call is too small..
    [3/4/2011 10:45:51 AM] [1] 0.  ErrorRecord: Microsoft.Exchange.Management.Deployment.ExsetdataException: An error occurred. The error code was 3221684346. The message was The data area passed to a system call is too small..
    [3/4/2011 10:45:51 AM] [1] [ERROR] An error occurred. The error code was 3221684346. The message was The data area passed to a system call is too small..
    [3/4/2011 10:45:51 AM] [1] Setup is halting task execution because of one or more errors in a critical task.
    [3/4/2011 10:45:51 AM] [1] Finished executing component tasks.
    [3/4/2011 10:45:51 AM] [1] Ending processing.
    Just curious though, how long is your FQDN? Mine is 34 characters plus whatever exchange is adding to it during setup for this particular string. I found a post with the same error for ISA server and some buffer is only 100 characters for a system call.
    ERROR_INSUFFICIENT_BUFFER 122 (0x7A) The data area passed to a system call is too small. http://msdn.microsoft.com/en-us/library/ms681382(v=vs.85).aspx Indicates a msft programming problem.
    Outsource Technology Inc. MSFT Professional Consultant

  • Reading output of a system call

    Hi,
    It appears that java system call does not return a value in Netware OS.
    The same code functions flawlessly on other OS'es, eg. linux and windows.
    If the following code is run on a Netware (6.5), the following error is
    returned:
    External App Returned:
    java.io.IOException: Bad file number
    Does anyone knows how to receive the values from the system call on Netware?
    To reproduce the problem, do the following:
    1) save the included source code to netware server's sys:java/classes
    with a filename ExecuteExternalApp.java
    2) compile it issuing a console command:
    javac sys:java/classes/ExecuteExternalApp.java
    3) execute the application:
    java ExecuteExternalApp volumes
    This should successfully launch the system command "volumes" but also
    would give an error message:
    External App Returned:
    java.io.IOException: Bad file number
    ---- Source code
    import java.io.*;
    public class ExecuteExternalApp{
    public static String executeSystemCommand(String command) throws
    Exception {
    String ret = "";
    try
    Process process = Runtime.getRuntime().exec(command);
    BufferedReader input = new BufferedReader(new
    InputStreamReader(process.getInputStream()));
    BufferedReader err = new BufferedReader(new
    InputStreamReader(process.getErrorStream()));
    //InputStreamReader iar = new
    InputStreamReader(process.getInputStream());
    StringBuffer sb = new StringBuffer();
    String line = "";
    //while ((line = input.readLine()) != null)
    //testi tuleeko yksi rivi
    line = input.readLine();
    sb.append(line);
    input.close();
    ret = sb.toString();
    catch (Exception err)
    ret = err.toString();
    return ret;
    public static void main(String[] args) throws Exception {
    if (args.length > 0){
    String output = executeSystemCommand(args[0]);
    System.out.println("External App Returned:");
    System.out.println(output);
    else
    System.out.println("Usage: ExecuteExternalApp <command>");

    Guenter wrote:
    > Hi Jonne,
    > Jonne Viljanen <jonne.viljanen@rmv_this.helsinki.fi> wrote in
    > news:y%[email protected]:
    >
    >> Thank you for your effort. I've been trying to write a simple program
    >> that would monitor if any cluster resource would be in comatose and in
    >> such case, it would try to online the resource on some other cluster
    >> node. For this I'd need to run these system commands and parse their
    >> output:
    >>
    >> - "cluster resources" - to see if any resource is in comatose
    >>
    >> and
    >>
    >> - "cluster view" - to determine which nodes are online.
    >>
    >> Also i'd need to run "cluster offline resource" and "cluster online
    >> resource node", but for these command I would not need to get the
    >> output.
    >>
    >> I know that my approach is a bit clumsy, but it's beauty is in its
    >> simplicity. Novell's engineer suggested that with a bit more effort one
    >> could read the data from ldap or cluster related virtual XML files on
    >> the _Admin volume. I think that I should investigate the latter
    >> approach, since I'd like to avoid handling the ldap authentication. I
    >> appreciate any comments and suggestions. Code examples are also greatly
    >> welcomed ;-)
    > hmmm, well that sounds to me as if the language doesnt matter at all since
    > finally you most likely fire your app from cron to do these tasks frequently
    > automatically, right? Therefore I'd suggest you take a look at Perl - it
    > seems better suited for these tasks; look at sys:/perl/scripts where you find
    > Perl scripts which do already some cluster stuff, and AFAICT these make use
    > of the _ADMIN volume.
    > Additional info and Perl samples can be found with the VFS NDK IIRC:
    > http://developer.novell.com/wiki/ind..._File_Services
    >
    > greetz, Gnter.
    >
    Hi Gnter,
    Thank you for your excellent help. I started to play with the _ADMIN
    -volume today. I was amazed to see how much can be done with it. I got
    my little cluster watch application almost working in just 1 hour, but
    then spent the rest of the day trying to get it fully functional ;-) I
    still cannot figure out what is wrong with my code, so I was wondering
    if I could get any help from this newsgroup.
    I'm able to read the *.xml files and determine the cluster state and all
    the information I need. However I dont seem to be able to write the
    command files. I'm trying the following:
    public void offlineClusterResource(String resourceName) {
    String fileName = "_ADMIN:/Novell/cluster/Resource.cmd";
    //String logFile = "sys:java/classes/ClusterWorker.log";
    String commandLine = "<virtualIO><datastream
    name=\"command\"></virtualIO>"+
    "<ncsRequest><offline>" +
    "<resource>" + resourceName + "</resource>" +
    "</offline></ncsRequest>";
    //Log("Turning the cluster resource " + resourceName + "
    offline!!!", logFile);
    try {
    //PrintWriter in autoFlush mode
    PrintWriter pw = new PrintWriter(new FileWriter(fileName,
    false), false);
    pw.println(commandLine);
    pw.close();
    } catch (IOException e) {
    System.out.println("Unable to write " + fileName);
    It seems not to write anything to _ADMIN:/Novell/cluster/Resource.cmd.
    If I set the file to be eg. SYS:/tmp/Resource.cmd -it writes nicely to
    the file.
    What am I missing here?
    Cheers,
    Jonne

  • Windows 2008 x64 TS Printing - The data area passed to a system call is too small

    Hi,
    I have a Windows 2008 TS using Easy Print. The server has two quad core cpu's with 16Gb of ram and is running a light processing accounting program for 80 users. The machine and easy print both work fine until the server reaches about 5Gb of memory in use. Once this happens user's documents stop printing with event id's 6161 The data area passed to a system call is too small being logged. None of the hotfixes seem to be applicable to my scenario as I am not getting the common "Access Denied" error. I have increased received and transmit buffer sizes on both NIC's to the 2048 maximum, and set the Sizreqbuf setting in the registry - to no avail.
    Any help appreciated.
    Thanks

    Hi,
    Thanks for the post.
    The Event error 6161 is caused by one of the following conditions:
    The printer is not reachable on the network
    Windows cannot allocate sufficient memory
    There was invalid or incomplete data received by the print spooler
    A driver upgrade failed
    There is a bad printer device driver
    For more information, please refer to the following article:
    http://technet.microsoft.com/en-us/library/cc773865(WS.10).aspx
    In this case, I assume that this issue may be caused by the insufficient memory.
    In Event Viewer, examine the event and look for the following text: "Win32 error code returned by the print processor: 8. Not enough storage is available to process this command".
    If so, please collect system information for 60 seconds and generate a System Diagnostics Report:
    Open an elevated Command Prompt window. (Click Start, point to All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator.)
    At the command prompt, type perfmon /report and then press ENTER. Reliability and Performance Monitor will start collecting data to create the System Diagnostics Report.
    When the report is ready for viewing, locate the Diagnostic Results section of the report, and then check for any warnings (indicated by Warnings in the report). You can follow links to additional help on resolving warnings from this section. In addition, you can expand each category in the Basic System Checks section to see more details about why warnings appear. Also, the Performance section provides process-level details about top consumers of resources. You might need to increase the size of the paging file or add physical memory.
    Thanks,
    Miles

  • Problems with accept () system call in Solaris 10

    We are doing some prototyping in Solaris 10/Zones using TCP sockets and have encountered the problem the "accept" system call in Solaris 10 always seem to return immediately without waiting for clients to connect to it. The same program works fine under Solaris 9 without any problems.
    So in the following call:
    ssock = accept( sockfd, (struct sockaddr*)bind_address, &alen );
    if( ssock < 0 )
    printf( "Accept failed: ...\n" );
    the program always prints "accept failed: " continuously. Is this a known issue?

    The problem only occurs when we use INADDR_ANY to bind a socket. The program works as expected when we use real as well as virtual IP address configured for an interface on any Solaris Zone. When we use INADDR_ANY, error number is 14 (EFAULT, Bad Address).
    Just wondering if we need to make any configuration changes in order to allow INADDR_ANY to work.

  • SYSTEM-CALL statement

    Hi experts,
    please help to give some detials about below statment:
    system-call init-text <p_text> using <p_field> program <program_name>.
    and i got one issue with above statement:
    system-call init-text p_text using 'SCN_PROJN' program 'SAPDBPSJ'.
    it seems that to get field description of 'SCN_PROJN' of logical database 'PSJ'. but after this statement p_text get value as 'CN_PROJN' instead of 'Project Definition'. this issue happens after system upgrade.
    please give some suggestion about above issue.
    thanks a billion.
    Aumas.

    SYSTEM-CALL is for SAP internal use only and has been replaced by kernel methods (see ABAP documentation). You should not use this statement as a customer, and if there is a problem with SAP standard code, then check for OSS notes.
    Thomas

  • Trex installation error FSL-00001  System call failed. Error 3

    I am installing trex on multiple hosts for a Production setup. Trex is version 7.0 patch level 40. All hosts are Windows servers running on "Windows Server 2003 R2 Enterprise x64 Edition, Service Pack 2" Distribution of trex instances are as follows,
    Index Server =1
    Slave Server =1
    Backup Server =1
    File Server =1
    I started of with installing Trex global filesystem which resulted in following error,
    ERROR 2008-10-23 15:19:27
    FSL-00001  System call failed. Error 3 (The system cannot find the path specified.
    ) in execution of system call 'FindFirstVolumeMountPoint' with parameter (
    ?\Volume{51f489f8-8ef6-11dd-886f-001e0beae60e}\), line (91) in file (synxcfsmit.cpp).
    ERROR 2008-10-23 15:19:27
    MUT-03025  Caught ESyException in Modulecall: The system cannot find the path specified.
    ERROR 2008-10-23 15:19:27
    FCO-00011  The step getMounts with step key |NW_TREX_Prepare|ind|ind|ind|ind|0|0|NW_GetSidNoProfiles|ind|ind|ind|ind|1|0|NW_getMounts|ind|ind|ind|ind|0|0|getMounts was executed with status ERROR .
    Installation is performed by administrator user and so has full access rights. Has anyone encountered such an error before.
    Regards,
    Sandeep

    I uninstalled the Python application via the Windows "Add/Remove" programs utility and that seems to have resolved the issue.
    TREX has been installed successfully.

  • Quotes in parameters to a system call

    Hello,
    From my program, which is a servlet, I'm making a system call using -
    (Runtime.getRuntime()).exec(cmd).waitFor();
    where cmd is a previously defined String giving the call to execute. The problem here is seen when the parameters to cmd (which happens to be a perl script in this case) include one or more where the values are strings which include spaces, and hence are in double quotes. For example, if I want to execute -
    /usr/local/bin/myScript.pl -t "Some text"
    When executed from a prompt this works fine and -t has the value -
    Some text
    However when called from my Java program as above, the script instead thinks that -t has the value -
    "Some
    I'm not sure how this is coming about, but it seems to be a feature of the way Java executes the command. Has anybody seen this before? How do I stop it happening? I have tried every combination of quotes of which I can think, but nothing seems to do what I want, and the command string when printed to screen, for example, looks exactly as it should.
    Thanks,
    Joe Partridge

    Or sat all separate parts in String[] like this:
    String[] cmds={"/usr/local/bin/myScript.pl","-t","Some text"}
    and call:
    (Runtime.getRuntime()).exec(cmds).waitFor();
    That also works and you don't have to remember to put quotes all the time
    Gil

  • System calls in Java

    Any suggestions how one would perform a UNIX call inside a C++ or Java program?
    Student who needs help.

    If it is really a system call, then you will have to define and implement a "native" method.
    o java method witha "native modifier".
    o write a small c program that implements the method
    If you define the native method, and then run java.h, the result is a header file for the c program.

  • Unix System Calls using Java

    Hi!
    Can anyone tell me how to do Unix System Calls in my Java program?
    If possible please give me the java code for it taking one unix system call as an example.
    Thanks in advance
    Raj

    do you mean firing off a shell command, or making actual kernel API calls or C library calls?
    for shell commands, have a look at Runtime.exec(). for kernel calls, use JNI. the JNI FAQ mentions something called "shared stubs" that may be of use:
    http://java.sun.com/products/jdk/faq/jnifaq.html
    cheers,
    p

Maybe you are looking for