Search Results

Search found 24382 results on 976 pages for 'tutor process procedure f'.

Page 75/976 | < Previous Page | 71 72 73 74 75 76 77 78 79 80 81 82  | Next Page >

  • Process RECEIVED email attatchment with PHP.

    - by Eli
    Hi All, I have a php script that will an catch email passed to it and process it. #!/usr/local/bin/php -q <?php while (!feof(STDIN)) {$s .= fgets(STDIN);} // Now do some work on the email source in $s. ?> This works fine. My question is how to save an attachment into the file system from the source. For example, if I isolate the section below, how do I need to process it before saving it into a gif file to create a valid gif? I assume I need to change the encoding, or otherwise process it, but does anyone know exactly? Thanks! --------------090607000609050308090504 Content-Type: image/gif; name="tfk.gif" Content-Transfer-Encoding: base64 Content-ID: <part1.06050801.05020504@etc....> Content-Disposition: attachment; filename="tfk.gif" R0lGODlheAA8APcAAAAAAP/////Wgv+xEgliOAEcDxAnFiAyHTA+JEBKK0BKLFBWM2BhOv// nf//tfz60dDEPdnPT//0Z3BtQf/kBv/pKM/KoO3UHendgoB5SOTGB/HSCNm8D7+oEvrhRcW1 U+visL2dA3hlAqqNBM+vB52DBo+ET4+EUJp+AnNgCmdUCZV9EredLJuKQ4x9PVNCBo1yC39n C6OGFYBpFp+QV4RtI1pMIJWBPq+cXkExBDQuHQwLCDYoBnRdIM+zbMCnZaiWabeleH1zWu/K e9+/dNi5dntsSaSPYpWDXHJmS6CQbl1UQOOYB/6xEv2wEv2vEvuuEvqtEvmsEvirEvaqEvWq EvSpEvOoEvGmE+6kE+yjE+uiE+qhE+mgE+efE+SdE+OcE9+ZEykdBtWvZejAcuS9cfHIeO/H d/nQffXMe/PLevzTf/rRfvnRfvjPffbNfPLKeurDdv7Vgf3UgfzTgPvTgPrSf/fPfvbOffTN fPHKe+/Jeu7Ied+7cty5cP7Vgv3VgvXOfvPMfdOxbOvGete0b7+hZfjRhNGyc+rIgti5eLWb aL+lb9K3gMWtfYh4V3dpTKyadGRcTOGaE9qVFNWRFNGOFM6MFMyKFMqJFMiHFMWFFMOEFMGC Fbx/FTQoE9CpYs2mYduzadiwZ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AB3VJVqSACuhATXNA BmUwmGWACmSwcxXxB2+wmIuZaY34B26gBozJmGlgBmZwBmdATiXGDJwABl7wBaJlEXOAC7UQ cF7QexSRLGszB3LwB62pEa5pUprjkX4zEnKAC7aQBS3WBE2AfhYhbC45QZ3QlJ9Xm8b5e9cQ nAMgeRLxB2sgCt+AS4uXXqlpNMd5nRNBedrmQZdgDoepBuhgDtr/UIyRZw4mV5zYaRI/cAIL oB4n0CUScQIKgANiIp8SYQbccI4TNAsf9Q3VYAvB53FiZw7yV53p2RII4Cx3cQKBcQB88SEC kAGBsQCfIgfiJUhDVQmUQFFARgWTEAzFwGSndKArQSoSQaHg8SnrKQAn8CntKRF/NAtbgGRb FAVVgAVcMAmZ4AvgoAtviFAkOhKEsQAS0yoTehcr2qLTQlrH0AyycFuUUAmawAmxMAu9MAzN sA3SkAsjlBHJEqQdoQB8gQMKsBclwhmEQQMnkKJDoABJMxyjcAxtBQ3ZIDvGgAy6EAqmYAZa 96Vg+hFZMxFEkDTfwRdOozUfaRJ++qeMGvoRi9qokKoRjxqplFo0EHGpmJqpmrqpCBEQADs= --------------090607000609050308090504--

    Read the article

  • Why won't my program terminate?

    - by Qwertie
    I have a .NET Compact Framework app that can runs on three windows machines (Desktop windows and two WinCE machines) and on the WinCE devices, the process never terminates on exit, even if I call Application.Exit(). Besides .NET, it uses one COM component (which does everything on the UI thread). If I break into the debugger after exitting, Visual Studio shows only one thread and a completely blank call stack. What could possibly cause this? Update: My process is terminating on the desktop but not the WinCE machines. I tried to force the process to terminate with the following code, but it doesn't work: [DllImport("coredll.dll")] static extern int TerminateProcess(IntPtr hProcess, uint uExitCode); static public void ExitProcess() { if (Platform.IsWindowsCE) TerminateProcess(new IntPtr(-1), 0); Application.Exit(); } There are also supposed to be ExitProcess() and GetCurrentProcess() APIs like the following, but if I try to call them, I get EntryPointNotFoundException. Therefore I am using TerminateProcess(-1, 0) because the documentation for the desktop version of GetCurrentProcess claims that it simply returns -1. [DllImport("coredll.dll")] static extern int ExitProcess(IntPtr hProcess); [DllImport("coredll.dll")] static extern IntPtr GetCurrentProcess(); Even if I do this: static public void ExitProcess() { if (Platform.IsWindowsCE) TerminateProcess(new IntPtr(-1), 0); Application.Exit(); throw new Exception("Trying to force quit."); } A fatal error dialog appears with a helpful "Quit" button, but pushing the button still does not cause the process to terminate on either machine!

    Read the article

  • Locating memory leak in Apache httpd process, PHP/Doctrine-based application

    - by Sam
    I have a PHP application using these components: Apache 2.2.3-31 on Centos 5.4 PHP 5.2.10 Xdebug 2.0.5 with Remote Debugging enabled APC 3.0.19 Doctrine ORM for PHP 1.2.1 using Query Caching and Results Caching via APC MySQL 5.0.77 using Query Caching I've noticed that when I start up Apache, I eventually end up 10 child processes. As time goes on, each process will grow in memory until each one approaches 10% of available memory, which begins to slow the server to a crawl since together they grow to take up 100% of memory. Here is a snapshot of my top output: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1471 apache 16 0 626m 201m 18m S 0.0 10.2 1:11.02 httpd 1470 apache 16 0 622m 198m 18m S 0.0 10.1 1:14.49 httpd 1469 apache 16 0 619m 197m 18m S 0.0 10.0 1:11.98 httpd 1462 apache 18 0 622m 197m 18m S 0.0 10.0 1:11.27 httpd 1460 apache 15 0 622m 195m 18m S 0.0 10.0 1:12.73 httpd 1459 apache 16 0 618m 191m 18m S 0.0 9.7 1:13.00 httpd 1461 apache 18 0 616m 190m 18m S 0.0 9.7 1:14.09 httpd 1468 apache 18 0 613m 190m 18m S 0.0 9.7 1:12.67 httpd 7919 apache 18 0 116m 75m 15m S 0.0 3.8 0:19.86 httpd 9486 apache 16 0 97.7m 56m 14m S 0.0 2.9 0:13.51 httpd I have no long-running scripts (they all terminate eventually, the longest being maybe 2 minutes long), and I am working under the assumption that once each script terminates, the memory it uses gets deallocated. (Maybe someone can correct me on that). My hunch is that it could be APC, since it stores data between requests, but at the same time, it seems weird that it would store data inside the httpd process. How can I track down which part of my app is causing the memory leak? What tools can I use to see how the memory usage is growing inside the httpd process and what is contributing to it?

    Read the article

  • What is effect of CTRL + Z on a unix\Linux application

    - by Kumar Alok
    I was curious and confused that what exactly is the behaviour of CTRl+Z. I know, If a process in running in foreground, and we press ctrl+z, it goes to background. But what exactly happens. Does it keep doing it's job, or does it get suspended, and stopped at the point where it was. Can someone please explain. And if it gets stopped at that point, and what is the meaning of background job. Regards Kumar Alok

    Read the article

  • Aplication Process never Terminates on each run

    - by rockyurock
    i am seeing an application always remains live even after closing the application using my below perl script.Also for the subsequent runs it always says that "The process cannot access the file because it is being used by another process.iperf.exe -u -s -p 5001 successful. Output was:" so everytime i have to change the file name $file used in script or i have to kill the iperf.exe process in the Task Manager. could anybody please let me know the way to get rid of it ? Here is the Code i am using ... my @command_output; eval { my $file = "abc6.txt"; $command = "iperf.exe -u -s -p 5001"; alarm 10; system("$command > $file"); alarm 0; close $file; }; if ($@) { warn "$command timed out.\n"; } else { print "$command successful. Output was:\n", $file; } unlink $file; /rocky

    Read the article

  • Is the RESTORE process dependent on schema?

    - by Martin Aatmaa
    Let's say I have two database instances: InstanceA - Production server InstanceB - Test server My workflow is to deploy new schema changes to InstanceB first, test them, and then deploy them to InstanceA. So, at any one time, the instance schema relationship looks like this: InstanceA - Schema Version 1.5 InstanceB - Schema Version 1.6 (new version being tested) An additional part of my workflow is to keep the data in InstanceB as fresh as possible. To fulfill this, I am taking the database backups of InstanceA and applying them (restoring them) to InstanceB. My question is, how does schema version affect the restoral process? I know I can do this: Backup InstanceA - Schema Version 1.5 Restore to InstanceB - Schema Version 1.5 But can I do this? Backup InstanceA - Schema Version 1.5 Restore to InstanceB - Schema Version 1.6 (new version being tested) If no, what would the failure look like? If yes, would the type of schema change matter? For example, if Schema Version 1.6 differed from Schema Version 1.5 by just having an altered storec proc, I imagine that this type of schema change should't affect the restoral process. On the other hand, if Schema Version 1.6 differed from Schema Version 1.5 by having a different table definition (say, an additional column), I image this would affect the restoral process. I hope I've made this clear enough. Thanks in advance for any input!

    Read the article

  • Java Process.waitFor() and IO streams

    - by lynks
    I have the following code; String[] cmd = { "bash", "-c", "~/path/to/script.sh" }; Process p = Runtime.getRuntime().exec(cmd); PipeThread a = new PipeThread(p.getInputStream(), System.out); PipeThread b = new PipeThread(p.getErrorStream(), System.err); p.waitFor(); a.die(); b.die(); The PipeThread class is quite simple so I will include it in full; public class PipeThread implements Runnable { private BufferedInputStream in; private BufferedOutputStream out; public Thread thread; private boolean die = false; public PipeThread(InputStream i, OutputStream o) { in = new BufferedInputStream(i); out = new BufferedOutputStream(o); thread = new Thread(this); thread.start(); } public void die() { die = true; } public void run() { try { byte[] b = new byte[1024]; while(!die) { int x = in.read(b, 0, 1024); if(x > 0) out.write(b, 0, x); else die(); out.flush(); } } catch(Exception e) { e.printStackTrace(); } try { in.close(); out.close(); } catch(Exception e) { } } } My problem is this; p.waitFor() blocks endlessly, even after the subprocess has terminated. If I do not create the pair of PipeThread instances, then p.waitFor() works perfectly. What is it about the piping of io streams that is causing p.waitFor() to continue blocking? I'm confused as I thought the IO streams would be passive, unable to keep a process alive, or to make Java think the process is still alive.

    Read the article

  • An Interactive Console I/O Wrapper/Interceptor in C# - What is the issue?

    - by amazedsaint
    I was trying to put together an interactive Console interceptor/wrapper in C# over the weekend, by re-mixing few code samples I've found in SO and other sites. With what I've as of now, I'm unable to read back from the console reliably. Any quick pointers? public class ConsoleInterceptor { Process _interProc; public event Action<string> OutputReceivedEvent; public ConsoleInterceptor() { _interProc = new Process(); _interProc.StartInfo = new ProcessStartInfo("cmd"); InitializeInterpreter(); } public ConsoleInterceptor(string command) { _interProc = new Process(); _interProc.StartInfo = new ProcessStartInfo(command); InitializeInterpreter(); } public Process InterProc { get { return _interProc; } } private void InitializeInterpreter() { InterProc.StartInfo.RedirectStandardInput = true; InterProc.StartInfo.RedirectStandardOutput = true; InterProc.StartInfo.RedirectStandardError = true; InterProc.StartInfo.CreateNoWindow = true; InterProc.StartInfo.UseShellExecute = false; InterProc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; bool started = InterProc.Start(); Redirect(InterProc.StandardOutput); Redirect(InterProc.StandardError); } private void Redirect(StreamReader input) { new Thread((a) => { var buffer = new char[1]; while (true) { if (input.Read(buffer, 0, 1) > 0) OutputReceived(new string(buffer)); }; }).Start(); } private void OutputReceived(string text) { if (OutputReceivedEvent != null) OutputReceivedEvent(text); } public void Input(string input) { InterProc.StandardInput.WriteLine(input); InterProc.StandardInput.Flush(); } }

    Read the article

  • Python GUI does not update until entire process is finished

    - by ccwhite1
    I have a process that gets a files from a directory and puts them in a list. It then iterates that list in a loop. The last line of the loop being where it should update my gui display, then it begins the loop again with the next item in the list. My problem is that it does not actually update the gui until the entire process is complete, which depending on the size of the list could be 30 seconds to over a minute. This gives the feeling of the program being 'hung' What I wanted it to do was to process one line in the list, update the gui and then continue. Where did I go wrong? The line to update the list is # Populate listview with drive contents. The print statements are just for debug. def populateList(self): print "populateList" sSource = self.txSource.Value sDest = self.txDest.Value # re-intialize listview and validated list self.listView1.DeleteAllItems() self.validatedMove = None self.validatedMove = [] #Create list of files listOfFiles = getList(sSource) #prompt if no files detected if listOfFiles == []: self.lvActions.Append([datetime.datetime.now(),"Parse Source for .MP3 files","No .MP3 files in source directory"]) #Populate list after both Source and Dest are chosen if len(sDest) > 1 and len(sDest) > 1: print "-iterate listOfFiles" for file in listOfFiles: sFilename = os.path.basename(file) sTitle = getTitle(file) sArtist = getArtist(file) sAlbum = getAblum(file) # Make path = sDest + Artist + Album sDestDir = os.path.join (sDest, sArtist) sDestDir = os.path.join (sDestDir, sAlbum) #If file exists change destination to *.copyX.mp3 sDestDir = self.defineDestFilename(os.path.join(sDestDir,sFilename)) # Populate listview with drive contents self.listView1.Append([sFilename,sTitle,sArtist,sAlbum,sDestDir]) #populate list to later use in move command self.validatedMove.append([file,sDestDir]) print "-item added to SourceDest list" else: print "-list not iterated"

    Read the article

  • deleting cookie at the end of a process

    - by RyanP13
    Hi, I am using the following plug in for cookies in jQuery: https://code.google.com/p/cookies/ The issue i am having is not with the plugin but when and how to delete the cookie at the end of a quoting process. The site i am using this on is a six step online quote and buy process. There is Omniture event serialisation sitestat tracking applied to some of the pages. This event serialisation has to include the name of the event and a random number of which i create. I have a generic function for this which i call at the bottom of the page like so: serialEvent('event21:', 'payment'); Here is the function: function serialEvent(eventNumber, eventName) { var sessionID = jaaulde.utils.cookies.get('sessionID'); var remLength = 20 - eventName.length; var remSession = sessionID.substr(sessionID.length - remLength, remLength); var eventName = eventName + remSession; s.events = eventNumber + eventName; } I need to delete the cookie at the end of the process, the Thank you page but i also need the cookie 'sessionID' for the 'serialEvent' function. As the function is called at the bottom of the page should i just write the cookie delete after it? Is that robust enough? I need to be sure that the function has successfully been called before the cookie is deleted. The code for deleting the cookie is quite simple: jaaulde.utils.cookies.del('sessionID'); Thanks :)

    Read the article

  • Multi-core processors: Better performance running multiple applications?

    - by aip.cd.aish
    I realize for single applications - the application itself has to be designed to take advantage of multiple cores. But what about executing many different applications simultaneously? On my development machine at an average instance, I run multiple servers (a database server, a web server), multiple instance of IDEs (either Visual Studio or NetBeans), Web-browser with multiple tabs (in Chrome, each tab is a process on its own), FTP client, SSH client etc. Does having a multi-core system improve the ability to run multiple applications simultaneously?

    Read the article

  • Alternative of procman in linux

    - by shadyabhi
    I want a program which gives all information relating to a currently running process. In Windows, there is procman . Whats the alternative in LINUX? Do i have to use tools like strace etc seperately, or there is one program that does all. Do share if you know of a nice software.

    Read the article

  • How can I see processes running in Windows 7?

    - by Roman
    I found the following sentence: Many Windows-Users may have wondered about the mDNSResponder.exe process running all the time. It’s Bonjour. Does anybody know how can I see these processes (I do not mean "mDNSResponder.exe". I mean in general.). It should be some analog of "top" command in Linux.

    Read the article

  • Sending one record from cursor to another function Postgres

    - by PylonsN00b
    FYI: I am completely new to using cursors... So I have one function that is a cursor: CREATE FUNCTION get_all_product_promos(refcursor, cursor_object_id integer) RETURNS refcursor AS ' BEGIN OPEN $1 FOR SELECT * FROM promos prom1 JOIN promo_objects ON (prom1.promo_id = promo_objects.promotion_id) WHERE prom1.active = true AND now() BETWEEN prom1.start_date AND prom1.end_date AND promo_objects.object_id = cursor_object_id UNION SELECT prom2.promo_id FROM promos prom2 JOIN promo_buy_objects ON (prom2.promo_id = promo_buy_objects.promo_id) LEFT JOIN promo_get_objects ON prom2.promo_id = promo_get_objects.promo_id WHERE (prom2.buy_quantity IS NOT NULL OR prom2.buy_quantity > 0) AND prom2.active = true AND now() BETWEEN prom2.start_date AND prom2.end_date AND promo_buy_objects.object_id = cursor_object_id; RETURN $1; END; ' LANGUAGE plpgsql; SO then in another function I call it and need to process it: ... --Get the promotions from the cursor SELECT get_all_product_promos('promo_cursor', this_object_id) updated := FALSE; IF FOUND THEN --Then loop through your results LOOP FETCH promo_cursor into this_promotion --Preform comparison logic -this is necessary as this logic is used in other contexts from other functions SELECT * INTO best_promo_results FROM get_best_product_promos(this_promotion, this_object_id, get_free_promotion, get_free_promotion_value, current_promotion_value, current_promotion); ... SO the idea here is to select from the cursor, loop using fetch (next is assumed correct?) and put the record fetched into this_promotion. Then send the record in this_promotion to another function. I can't figure out what to declare the type of this_promotion in get_best_product_promos. Here is what I have: CREATE OR REPLACE FUNCTION get_best_product_promos(this_promotion record, this_object_id integer, get_free_promotion integer, get_free_promotion_value numeric(10,2), current_promotion_value numeric(10,2), current_promotion integer) RETURNS... It tells me: ERROR: plpgsql functions cannot take type record OK first I tried: CREATE OR REPLACE FUNCTION get_best_product_promos(this_promotion get_all_product_promos, this_object_id integer, get_free_promotion integer, get_free_promotion_value numeric(10,2), current_promotion_value numeric(10,2), current_promotion integer) RETURNS... Because I saw some syntax in the Postgres docs showed a function being created w/ a input parameter that had a type 'tablename' this works, but it has to be a tablename not a function :( I know I am so close, I was told to use cursors to pass records around. So I studied up. Please help.

    Read the article

  • Application process never terminates on each run

    - by rockyurock
    I am seeing an application always remains live even after closing the application using my Perl script below. Also, for the subsequent runs, it always says that "The process cannot access the file because it is being used by another process. iperf.exe -u -s -p 5001 successful. Output was:" So every time I have to change the file name $file used in script or I have to kill the iperf.exe process in the Task Manager. Could anybody please let me know the way to get rid of it? Here is the code I am using ... my @command_output; eval { my $file = "abc6.txt"; $command = "iperf.exe -u -s -p 5001"; alarm 10; system("$command > $file"); alarm 0; close $file; }; if ($@) { warn "$command timed out.\n"; } else { print "$command successful. Output was:\n", $file; } unlink $file;

    Read the article

  • How to cancel a deeply nested process

    - by Mystere Man
    I have a class that is a "manager" sort of class. One of it's functions is to signal that the long running process of the class should shut down. It does this by setting a boolean called "IsStopping" in class. public class Foo { bool isStoping void DoWork() { while (!isStopping) { // do work... } } } Now, DoWork() was a gigantic function, and I decided to refactor it out and as part of the process broke some of it into other classes. The problem is, Some of these classes also have long running functions that need to check if isStopping is true. public class Foo { bool isStoping void DoWork() { while (!isStopping) { MoreWork mw = new MoreWork() mw.DoMoreWork() // possibly long running // do work... } } } What are my options here? I have considered passing isStopping by reference, which I don't really like because it requires there to be an outside object. I would prefer to make the additional classes as stand alone and dependancy free as possible. I have also considered making isStopping a property, and then then having it call an event that the inner classes could be subscribed to, but this seems overly complex. Another option was to create a "Process Cancelation Token" class, similar to what .net 4 Tasks use, then that token be passed to those classes. How have you handled this situation? EDIT: Also consider that MoreWork might have a EvenMoreWork object that it instantiates and calls a potentially long running method on... and so on. I guess what i'm looking for is a way to be able to signal an arbitrary number of objects down a call tree to tell them to stop what they're doing and clean up and return.

    Read the article

  • How to copy files without slowing down my app?

    - by Kevin Gebhardt
    I have a bunch of little files in my assets which need to be copied to the SD-card on the first start of my App. The copy code i got from here placed in an IntentService works like a charm. However, when I start to copy many litte files, the whole app gets increddible slow (I'm not really sure why by the way), which is a really bad experience for the user on first start. As I realised other apps running normal in that time, I tried to start a child process for the service, which didn't work, as I can't acess my assets from another process as far as I understood. Has anybody out there an idea how a) to copy the files without blocking my app b) to get through to my assets from a private process (process=":myOtherProcess" in Manifest) or c) solve the problem in a complete different way Edit: To make this clearer: The copying allready takes place in a seperate thread (started automaticaly by IntentService). The problem is not to separate the task of copying but that the copying in a dedicated thread somehow affects the rest of the app (e.g. blocking to many app-specific resources?) but not other apps (so it's not blocking the whole CPU or someting) Edit2: Problem solved, it turns out, there wasn't really a problem. See my answer below.

    Read the article

  • Tracking down origin of I/O in multi-process server

    - by Craig Ringer
    I'm currently trying to track down some phantom I/O in a PostgreSQL build I'm testing. It's a multi-process server and it isn't simple to associate disk I/O back to a particular back-end and query. I thought Linux's perf tool would be ideal for this, but I'm struggling to capture block I/O performance counter metrics and associate them with user-space activity. It's easy to record block I/O requests and completions with, eg: sudo perf record -g -T -u postgres -e 'block:block_rq_*' and the user-space pid is recorded, but there's no kernel or user-space stack captured, or ability to snapshot bits of the user-space process's heap (say, query text) etc. So while you have the pid, you don't know what the process was doing at that point. Just perf script output like: postgres 7462 [002] 301125.113632: block:block_rq_issue: 8,0 W 0 () 208078848 + 1024 [postgres] If I add the -g flag to perf record it'll take snapshots of the kernel stack, but doesn't capture user-space state for perf events captured in the kernel. The user-space stack only goes up to the entry-point from userspace, like LWLockRelease, LWLockAcquire, memcpy (mmap'd IO), __GI___libc_write, etc. So. Any tips? Being able to capture a snapshot of the user-space stack in response to kernel events would be ideal.

    Read the article

  • Profile creation process stuck halfway Websphere

    - by ngubk
    I'm creating a cell profile on Linux Mint 12 , WAS 8.0 Network Deployment Trial. But using manageProfiles.sh or Profile Management Tool, I can not create any profile (cell, application ...). When I check the log file, the profile creation process is always stop halfway (does not show any error, just stuck there). The log is always like this <record> <date>2012-11-02T04:11:15</date> <millis>1351847475108</millis> <sequence>2985</sequence> <logger>com.ibm.ws.install.configmanager.actionengine.ant.utils.ANTLogToCmtLogAdapter</logger> <level>INFO</level> <class>com.ibm.ws.install.configmanager.actionengine.ant.utils.ANTLogToCmtLogAdapter</class> <method>messageLogged</method> <thread>0</thread> <message>replacing value for user.install.root (null) with (/opt/IBM/WebSphere/AppServer/profiles)</message> </record> <record> <date>2012-11-02T04:11:15</date> <millis>1351847475108</millis> <sequence>2986</sequence> <logger>com.ibm.ws.install.configmanager.actionengine.ant.utils.ANTLogToCmtLogAdapter</logger> <level>INFO</level> <class>com.ibm.ws.install.configmanager.actionengine.ant.utils.ANTLogToCmtLogAdapter</class> <method>messageLogged</method> <thread>0</thread> <message>replacing value for was.install.root (/opt/IBM/WebSphere/AppServer) with (/opt/IBM/WebSphere/AppServer)</message> </record> <record> <date>2012-11-02T04:11:15</date> <millis>1351847475108</millis> <sequence>2987</sequence> <logger>com.ibm.ws.install.configmanager.actionengine.ant.utils.ANTLogToCmtLogAdapter</logger> <level>INFO</level> <class>com.ibm.ws.install.configmanager.actionengine.ant.utils.ANTLogToCmtLogAdapter</class> <method>messageLogged</method> <thread>0</thread> <message>replacing value for was.repository.root (null) with (/opt/IBM/WebSphere/AppServer/profiles/config)</message> </record> <record> <date>2012-11-02T04:11:15</date> <millis>1351847475108</millis> <sequence>2988</sequence> <logger>com.ibm.ws.install.configmanager.actionengine.ant.utils.ANTLogToCmtLogAdapter</logger> <level>INFO</level> <class>com.ibm.ws.install.configmanager.actionengine.ant.utils.ANTLogToCmtLogAdapter</class> <method>messageLogged</method> <thread>0</thread> <message>replacing value for com.ibm.ws.scripting.wsadminprops (null) with (/opt/IBM/WebSphere/AppServer/profiles/properties/wsadmin.properties)</message> </record> <record> <date>2012-11-02T04:11:15</date> <millis>1351847475120</millis> <sequence>2989</sequence> <logger>com.ibm.ws.install.configmanager.actionengine.ant.utils.ANTLogToCmtLogAdapter</logger> <level>INFO</level> <class>com.ibm.ws.install.configmanager.actionengine.ant.utils.ANTLogToCmtLogAdapter</class> <method>messageLogged</method> <thread>0</thread> <message>Resetting listener available status to: false</message> </record> <record> <date>2012-11-02T04:11:15</date> <millis>1351847475121</millis> <sequence>2990</sequence> <logger>com.ibm.ws.install.configmanager.actionengine.ant.utils.ANTLogToCmtLogAdapter</logger> <level>INFO</level> <class>com.ibm.ws.install.configmanager.actionengine.ant.utils.ANTLogToCmtLogAdapter</class> <method>messageLogged</method> <thread>0</thread> <message>setting wsadmin requester timeouts</message> </record> <record> <date>2012-11-02T04:11:15</date> <millis>1351847475128</millis> <sequence>2991</sequence> <logger>com.ibm.ws.install.configmanager.actionengine.ant.utils.ANTLogToCmtLogAdapter</logger> <level>INFO</level> <class>com.ibm.ws.install.configmanager.actionengine.ant.utils.ANTLogToCmtLogAdapter</class> <method>messageLogged</method> <thread>0</thread> <message>wsadmin requester retry count = 240000, initialization retry count = 12000, shutdown retry count = 12000</message> </record> <record> <date>2012-11-02T04:11:15</date> <millis>1351847475128</millis> <sequence>2992</sequence> <logger>com.ibm.ws.install.configmanager.actionengine.ant.utils.ANTLogToCmtLogAdapter</logger> <level>INFO</level> <class>com.ibm.ws.install.configmanager.actionengine.ant.utils.ANTLogToCmtLogAdapter</class> <method>messageLogged</method> <thread>0</thread> <message>Checking for wsadmin listener initialization</message> </record>

    Read the article

  • Creating a MiniDump of a running process

    - by Lodle
    Im trying to make a tool for my end users that can create a MiniDump of my application if it hangs (i.e. external to the app). Im using the same code as the internal MiniDumper but with the handle and processid of the app but i keep getting error code 0xD0000024 when calling MiniDumpWriteDump. Any ideas? void produceDump( const char* exe ) { DWORD processId = 0; HANDLE process = findProcess(exe, processId); if (!process || processId == 0) { printf("Unable to find exe %s to produce dump.\n", exe); return; } LONG retval = EXCEPTION_CONTINUE_SEARCH; HWND hParent = NULL; // find a better value for your app // firstly see if dbghelp.dll is around and has the function we need // look next to the EXE first, as the one in System32 might be old // (e.g. Windows 2000) HMODULE hDll = NULL; char szDbgHelpPath[_MAX_PATH]; if (GetModuleFileName( NULL, szDbgHelpPath, _MAX_PATH )) { char *pSlash = _tcsrchr( szDbgHelpPath, '\\' ); if (pSlash) { _tcscpy( pSlash+1, "DBGHELP.DLL" ); hDll = ::LoadLibrary( szDbgHelpPath ); } } if (hDll==NULL) { // load any version we can hDll = ::LoadLibrary( "DBGHELP.DLL" ); } LPCTSTR szResult = NULL; int err = 0; if (hDll) { MINIDUMPWRITEDUMP pDump = (MINIDUMPWRITEDUMP)::GetProcAddress( hDll, "MiniDumpWriteDump" ); if (pDump) { char szDumpPath[_MAX_PATH]; char szScratch [_MAX_PATH]; time_t rawtime; struct tm * timeinfo; time ( &rawtime ); timeinfo = localtime ( &rawtime ); char comAppPath[MAX_PATH]; SHGetFolderPath(NULL, CSIDL_COMMON_APPDATA , NULL, SHGFP_TYPE_CURRENT, comAppPath ); //COMMONAPP_PATH _snprintf(szDumpPath, _MAX_PATH, "%s\\DN", comAppPath); CreateDirectory(szDumpPath, NULL); _snprintf(szDumpPath, _MAX_PATH, "%s\\DN\\D", comAppPath); CreateDirectory(szDumpPath, NULL); _snprintf(szDumpPath, _MAX_PATH, "%s\\DN\\D\\dumps", comAppPath); CreateDirectory(szDumpPath, NULL); char fileName[_MAX_PATH]; _snprintf(fileName, _MAX_PATH, "%s_Dump_%04d%02d%02d_%02d%02d%02d.dmp", exe, timeinfo->tm_year+1900, timeinfo->tm_mon, timeinfo->tm_mday, timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec ); _snprintf(szDumpPath, _MAX_PATH, "%s\\DN\\D\\dumps\\%s", comAppPath, fileName); // create the file HANDLE hFile = ::CreateFile( szDumpPath, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL ); if (hFile!=INVALID_HANDLE_VALUE) { MINIDUMP_CALLBACK_INFORMATION mci; mci.CallbackRoutine = (MINIDUMP_CALLBACK_ROUTINE)MyMiniDumpCallback; mci.CallbackParam = 0; MINIDUMP_TYPE mdt = (MINIDUMP_TYPE)(MiniDumpWithPrivateReadWriteMemory | MiniDumpWithDataSegs | MiniDumpWithHandleData | //MiniDumpWithFullMemoryInfo | //MiniDumpWithThreadInfo | MiniDumpWithProcessThreadData | MiniDumpWithUnloadedModules ); // write the dump BOOL bOK = pDump( process, processId, hFile, mdt, NULL, NULL, &mci ); DWORD lastErr = GetLastError(); if (bOK) { printf("Crash dump saved to: %s\n", szDumpPath); return; } else { _snprintf( szScratch, _MAX_PATH, "Failed to save dump file to '%s' (error %u)", szDumpPath, lastErr); szResult = szScratch; err = ERR_CANTSAVEFILE; } ::CloseHandle(hFile); } else { _snprintf( szScratch, _MAX_PATH, "Failed to create dump file '%s' (error %u)", szDumpPath, GetLastError()); szResult = szScratch; err = ERR_CANTMAKEFILE; } } else { szResult = "DBGHELP.DLL too old"; err = ERR_DBGHELP_TOOLD; } } else { szResult = "DBGHELP.DLL not found"; err = ERR_DBGHELP_NOTFOUND; } printf("Could not produce a crash dump of %s.\n\n[error: %u %s].\n", exe, err, szResult); return; } this code works 100% when its internal to the process (i.e. with SetUnhandledExceptionFilter)

    Read the article

  • Scala isn't allowing me to execute a batch file whose path contains spaces.Same Java code does.What

    - by Geo
    Here's the code I have: var commandsBuffer = List[String]() commandsBuffer ::= "cmd.exe" commandsBuffer ::= "/c" commandsBuffer ::= '"'+vcVarsAll.getAbsolutePath+'"' commandsBuffer ::= "&&" otherCommands.foreach(c => commandsBuffer ::= c) val asArray = commandsBuffer.reverse.toArray val processOutput = processutils.Proc.executeCommand(asArray,true) return processOutput otherCommands is an Array[String], containing the following elements: vcbuild /rebuild path to a .sln file vcVarsAll contains the path to Visual Studio's vcvarsall.bat. It's path is C:\tools\microsoft visual studio 2005\vc\vcvarsall.bat. The error I receive is: 'c:\Tools\Microsoft' is not recognized as an internal or external command, operable program or batch file.. The processutils.Proc.executeCommand has the following implementation: def executeCommand(params:Array[String],display:Boolean):(String,String) = { val process = java.lang.Runtime.getRuntime.exec(params) val outStream = process.getInputStream val errStream = process.getErrorStream ... } The same code, executed from Java/Groovy works. What am I doing wrong?

    Read the article

  • .NET StandardInput Sending Modifiers

    - by Paul Oakham
    We have some legacy software which depends on sending keystrokes to a DOS window and then scraping the screen. I am trying to re-create the software by redirecting the input and output streams of the process directly to my application. This part I have managed fine using: _Process = new Process(); { _Process.StartInfo.FileName = APPLICATION; _Process.StartInfo.RedirectStandardOutput = true; _Process.StartInfo.RedirectStandardInput = true; _Process.StartInfo.RedirectStandardError = true; _Process.StartInfo.UseShellExecute = false; _Process.StartInfo.CreateNoWindow = true; _Process.OutputDataReceived += new DataReceivedEventHandler(_Process_OutputDataReceived); _Process.ErrorDataReceived += new DataReceivedEventHandler(_Process_ErrorDataReceived); } My problem is I need to send some command modifiers such as Ctrl, ALT and Space as well as F1-12 to this process but am unsure how. I can send basic text and I receive response's fine. I just need to emulate these modifiers.

    Read the article

< Previous Page | 71 72 73 74 75 76 77 78 79 80 81 82  | Next Page >