How to chang the environment of running process in C?

Hi All,
I have a application written in C ( OS Solaris 10 ) actually this application runs under some pre defined and standardised environment (specific to my project ).
Now I have requirement to access API of a library( already existing code ) in my application to perform some operations. I need to enhance my C code.
This API ( or library ) is not compatible with the standardised environment set for my application.(standardised environment (specific to my project ))
Can anybody please suggest me how can I set the environment (compatible to the library)while using that API (or library ) and reset to my project specific environment after the result is obtained from the new API (library ).
To be more specific during execution of my C-Application ( Environment variable LD_PRELOAD=/usr/lib/secure/libmtmalloc.so ). I am enhancing my application to use PAM Modules ( Pluggable Authentication Modules ) PAM APIs exposed performs internally some operation and return some values to me.But inside the PAM my application is crashing during malloc operation.
I have written a test application when it uses PAM APIs and perform the same operation under normal enviroment (uses libc for memory related function) it works fine.
So please tell me how can I set this environment variable LD_PRELOAD to libc only during execution of this API and revert this environment variable LD_PRELOAD back to libmtmalloc after it performs this operation is done.
Please dont tell me about the bug with libmtmalloc.so instead please provide me with some programming solution to achieve this.
Thanks alot in advance.
Regards,
Rahul.

rahulsingh wrote:
*What do you mean "linked"? libC is dynamic (run-time) object. So your
library will be linked with the necessary items at runtime. If mtmalloc
is preloaded, then it may well use the mtmalloc routines.*
By linked I mean if I that library(libraryA) during compilations process it is linked to libC ( -lC). No, that doesn't normally happen at compile time. It might check the library to see what functions are in it, but it doesn't actually take sections of libC and place them in the library.
Instead, the run-time linker places both your library and libC (and the app, and other dynamic libraries) in memory when the app is run. LD_LIBRARY_PATH and LD_PRELOAD both affect the run-time linker in where and how it will look for libraries to load. You can see where it resolves by using 'ldd' on the app.
This will show dynamic libraries that were required at compilation time. It is also possible for an application to explicitly grab a library via 'dlopen'. Any such files will not appear in 'ldd' output.
Darren

Similar Messages

  • How to change the maximum number of process per user in BW ?

    Hi,
    Do you know how to change the maximum number of process allowed per user ?
    With RSRT we can customize the number of process per query but I don't know where we can customize the maximum number of process per user.
    In fact, my production environment reach always the max number of process available in SM50...
    Thanks a lot

    Hi,
    A user is not have the No. of processor but a work process can handle N No. of users. If a user hit any transaction v acn say from  a list of N worl proceesor which has been taken the work.
    Correct if I am wrong.
    Regards
    Syed.

  • How to change the status of a process chain

    Hi,
    I went through Siegfried's blog and knew how to restart a process chain at a failed step which doesn't have "Repeat" option.
    But is there any other function module through which we can change the "Actual State" of the process chain, in siggi's method we can change only the "i_state" of a particular process but not the "Actual State"(refer to RSPCPROCESSLOG table) of the process chain.
    Please do give your suggestions if there is any way to change the "Actual State" of a process chain.
    Regards

    hey Vamshi,
    We can directly change the status of the process chain.
    there is a specific way to do it, you can go in se38 and change the status from one to another ...go to se38 .... type....rspcprocessmonitor*.........presss f4...
    you will get a standard program ..
    now go to this program ...and give the set of inputs .... like PID and all from RSPCPROCESSLOG table ..
    and in the state give the state you want and press f8.
    this should work.
    Assign points if it answers your queries.
    Thanks,
    Dennis

  • How to change the Owner of a Process

    We have a Business Process Flow and the owner is someone no longer with our company. Not finding a way to change the Owner on the process. Does anyone know how to accomplish that?

    Hello,
    Try following:
    Open CRM -> Settings -< Processes -> Select BPF -> Click Assign at toolbar, select user and click OK.
    Dynamics CRM MVP
    My blog

  • How to change the skin at run time

    I am using jDeveloper 11.1.1.3 for ADF.
    My UseCase: i want to give a dropdown for skins. User should be able to select the skin at run time and it should be loaded. Please let me know how can i achieve it.
    Zee

    As per usecase, looks like you have the LOV containing the different skins.
    You can ensure that the application is skinned according to the selected value in the LOV.
    Ensure that you have a session scope variable that is set, whenever you change the LOV.
    For more details, look into this link http://download.oracle.com/docs/cd/E14571_01/web.1111/e10140/skinning.htm
    Thanks for your reply, but then...... what will be the skin loaded by default before the user selects the skin - drop down. Do i have to set something default before hand .?Define the LOV such that there are no empty elements. i.e the first element in the LOV is selected.
    In the Managed bean, if the session scope is not set, return the skin family for the first element. This would be the scenario when the application loads.
    Thanks,
    Navaneeth

  • How to change the context name

    I have deployed an application in oracle 9iAS, with the context as Sample,
    now iam able to access the application as
    http://ipaddress:7777/context
    how to change the application to run in default context
    how to change it to http://ipaddress:7777 to access the application, where should i make the changes

    Just to share the solution.
    Solved it following way:
    deployed like I usually deploy via EM and then used "Fetch Deployment Plan" in EM (you can actually fetch the plan in admin console, too, I think). And then modified that plan.xml istead of creating my own. The advantage is: EM does the magic, you only have to copy the solution ;-)
    The problem for me was, that I was not modifiying the appropriate deployment descriptor because I haven't seen the descriptor's xml file in JDeveloper. This xml was generated by JDev when using "Deploy to EAR". Only realised that after I have unzipped the generated ear.

  • How to change the Browser title when report runs on the web?

    Hi folks,
    How to change the title of the browser when I run my report on the web? Iam using Internet explorer and Reports 6i. Is it possible in 6i or 10g reports?
    Could you please tell me the step by step procedure ?
    Right now the browser is displaying the URL when I run the report with format = PDF.
    Thanks.

    It works for me. I don't see why you have a problem with >this code.
    Can you look at the source code of the html >file that was created (so, not in the browser, but in a >text editor). What do the header and title look like?The Html code in the file is same as the above code I specified. Actually I copied the same code and pasted here. But when I run the html file the Title shows up.
    Don't put </html> there. Maybe that helps. I tried this, but it did not work.
    Please let me know is there any way to set it dynamically inside the triggers using SRW built_in.
    Thanks alot.

  • How to change the Schema (DB2, Oracle) in CommandTable at run time

    Dear all,
    I have a problem as below:
    I have created report with CommandTable, then I am using Java and CRJ 12 to export data. So how to change the SCHEMA in CommandTable? 
    Please help me on this.
    Ex: CommandTable is SELECT * from SCHEMA.TableA, SCHEMA.TableB
    Thanks,
    Nha

    Dear Ted,
    I want to change DataSource, it means the report will be load and change connection at run time (using CRJ SDK) and i want to change the SCHEMA.Tablename in CommandTable in report.
    I also use the parameter to do it, but it can not be at run time, just correct when designing.
    Could you please help me on this. You can post the code if any.
    Thanks,
    Nha

  • How to change the input and output schema in BPEL process

    hi',
    Please tell me how to change the input and output schema in BPEL process after the process is made.
    thanks
    Yatan

    If your intention is just changing the content you are passing to bpel/returning from bpel
    Here is another way
    just update your default created xsd files with new elements, update wsdl elements in message definition and chnage bpel code to reflect new elements in activities
    Regards,
    Praveen

  • How to change the running apple ID on iPad !?

    How to change the running apple ID on iPad !?

    1st.BOSS wrote:
    What about icloud !?
    What about it.?
    Please clearly state what you are attempting to do.
    If necessary... Consult the User Guide
    and/or see here  >  http://www.apple.com/support/ipad/

  • How to change the font size and style on run time

    dear all
    i try to change the font style and font size on runtime. I did the following:
    1- i created an item(:font_size) in which i will write the size of the font for the the other item ('customer_name')
    2 on the post_change trigger for 'font_size' i write this code
    SET_ITEM_PROPERTY('customer_name',FONT_size,(:font_size);
    i write 12 then then font size changed , then i write 18 , the size does not change. and when i write any value , no change happens. I do not know why
    the second problem is how to change the font style
    i made three checkbooks (bold,italic,underline)
    on the trugger when_checkbox_checked i write
         IF :BOLD = 'B' THEN
         SET_ITEM_PROPERTY('N_SAMPLE',FONT_STYLE,'BOLD');
         ELSE
    SET_ITEM_PROPERTY('N_SAMPLE',FONT_STYLE,'REGULAR');
         END IF;     
    no change happend at all.
    please help

    Hi friend,
    it's a really really strange tip... May be it's a Forms bug? I've tried with set_item_property..and.. you're right, it doesn't work..
    So.. you can try making this:
    - create a visual attribute with an specific font size....
    - use the
    SET_ITEM_INSTANCE_PROPERTY('block.item',CURRENT_RECORD,VISUAL_ATTRIBUTE,'you_visual_attribute');
    and call it from psot-change....
    It works
    Hope it helps,
    Jose.

  • How to change the classpath in rmiregistry

    I am storing remote object stubs in an RMI registry as part of my application. When I try to bind my objects to the rmiregistry started by the kxs process on port 1099, I get class def not found errors because that rmiregistry does not have my classes in the classpath. My classes are in the iAS classpath because I added them through the registry.
    When I start my own rmiregistry on a different port and set the classpath environment variable to include my classes, then I have no problems.
    Does anyone know how to change the classpath for the rmiregistry started by the kxs process?
    I am running iAS sp3 on Windows 2000 adn Solaris
    Thanks,
    Mark

    Hi,
    I would like to help, but could you kindly clarify what rmiregistry
    means ?
    Regards
    Raj
    Mark Priest wrote:
    I am storing remote object stubs in an RMI registry as part of my
    application. When I try to bind my objects to the rmiregistry started
    by the kxs process on port 1099, I get class def not found errors
    because that rmiregistry does not have my classes in the classpath.
    My classes are in the iAS classpath because I added them through the
    registry.
    When I start my own rmiregistry on a different port and set the
    classpath environment variable to include my classes, then I have no
    problems.
    Does anyone know how to change the classpath for the rmiregistry
    started by the kxs process?
    I am running iAS sp3 on Windows 2000 adn Solaris
    Thanks,
    Mark
    Try our New Web Based Forum at http://softwareforum.sun.com
    Includes Access to our Product Knowledge Base!

  • How to change the IO status to CLOSE after it has been settled through ko8g

    hi ,
    I have the following scenario : An internal order is assigned to a PO and after setllement of such an order i need to CLOSE the order .
    The PO has a GR done (no IR) . Currently Internal Order is in the status : TECO [technically complete] and setlement has ben doneusing Actual Settlemnet Run using KO8G.
    Now i need to change the IO status to  [ CLOSE ] : it is gving an error in KO02 : Balance is not zero .
    How  to change the Internal Order status to CLOSE or rather how to make teh balance in that Order toZero?
    Is it reqd to process some GR's for teh same PO ?
    Thansk
    Trina

    Hi,
    Check the order balance in Ko02
    Menu -->  Extras  -->  Order Balance if balance exist it means that the order has not completely settled.
    Regards,
    Raj

  • How to change the security settings of tomcat5.0

    hi i am new to servlets. i am using tomcat5.0 to run my servlets.i have created two web applications under webapps directorywith the names ourwa and new ourwa.as part of ourwa i have developed a servlet with name Caller that includes another servlet named Calle of newourwa. to do this i got the Servlet Context object newourwa with the code below
    ServletContext application=getServletContext( );
    ServletContext newapplication=getContext("/newourwa" );
    and i included Calle servlet using this newApplication with the code below
    RequestDispatcher rd=newapplication.getRequestDispatcher("/calle");
    rd.include(request,response);
    i am not getting the ServletContext object of newourwa. so i am getting null pointer exception while running the servlet Caller.
    i read the documentation on servlet context inteface.there is a method with the name get Context( ).in this method they clearly specified that "in a security conscious environment this method returns null".
    please help me by giving answers to the following questions:
    1)wat is the alternative to dispatch the request from one application to another application?
    2)how to change the seurity settings of tomcat5.0?
    thanks.

    There has been a change in the Java security settings, see:
    *http://kb.mozillazine.org/Java#Java_security_prompts
    *"What should I do when I see a security prompt from Java?":<br>http://www.java.com/en/download/help/appsecuritydialogs.xml
    If you visit a website regularly then a possible workaround is to add the URL to the Java Exceptions Site List, see:
    *"Why are Java applications blocked by your security settings?":<br>http://www.java.com/en/download/help/java_blocked.xml
    *"How can I configure the Exception Site List?":<br>http://www.java.com/en/download/faq/exception_sitelist.xml

  • How to change the database in Crystal reports

    To give an overview there is one project going on where the oracle database is getting migrated from 10g to 11g.
    All the details of database like IP, port etc are changing as part of this.
    I can see the driver name configured as crdb_ado (Custom driver).
    We have an test environment for 11g against which we have to point all the reports and test it.
    Could you please let me know the below queries
    Where and how to change the IP details in the crystal reports to point to new test and prod databases.
    Overview on this crdb_ado driver
      Basically the database is getting changed and we want the reports to point and run from the new database.
    Thanks

    Hi Vissu,
    Thanks for your reply.
    We need to change the database from the reports which are already running from central management console.
    I can see a custom driver crdb_ado is being used and it connects to a database.
    Could you please let me know where the database configuration is done.
    Ideally we need to add one more database to a config file which i am not able to find.
    I guess it should be similar to tnsnames.ora file in oracle where the different databases are stored.
    From the above image I would like to know where the server details (NECTAR_Prod) would be configured.
    Thanks in advance

Maybe you are looking for