Search Results

Search found 125 results on 5 pages for 'forking'.

Page 4/5 | < Previous Page | 1 2 3 4 5  | Next Page >

  • Git How do I Push a project, that was Downloaded from Source

    - by JZ
    I worked with a graphic designer that did not clone from my github account. He downloaded the project from source rather than using the command "git clone". Since he pulled his files, a month has gone by and I want to do the following tasks: Create a new branch Push the graphic designers project into that branch Merge his branch with Master I've tried the following the github forking guide with not much luck; when I attempt to push the files into a new branch I get an error: fatal: Not a git repository (or any of the parent directories): .git How do I do this?

    Read the article

  • Unit testing "hybrid" WPF/Silverlight controls

    - by Alan Mendelevich
    I'm starting a new WPF/Silverlight custom control project and wanted to do unit testing on this one. However I'm a little confused about how to approach this. This control would be based on the same codebase for both WPF and Silverlight with minor forking using #ifs and partial classes to tame the differences. I guess I could write unit tests for WPF part with NUnit, MSTest, xUnit, etc. and for the Silverlight part with Silverlight Unit Test Framework but this doesn't sound very elegant to me. I'd have to either ignore testing identical code on one of the platforms and test only differing parts (which is not very trustworthy) or rewrite tests for 2 frameworks (which is annoying). Is this the right way to go? I'm wondering if there's some guidance, articles, tutorials out there on how to approach this task. Any pointers?

    Read the article

  • Perl unit test - start a tcp server & continue

    - by John
    I am trying to write a unit test for a client server application. To test the client, in my unit test, I want to first start my tcp server (which itself is another perl file). I tried to start the tcp server by forking: if (! fork()) { system ("$^X server.pl") == 0 or die "couldn't start server" } So when I call "make test" after "perl Makefile.PL", this test starts & I can see the server starting but after that the unit test just hangs there. So I guess I need to start this server in background and I tried the "&" at the end to force it to start in background & then test to continue. But, I still couldn't succeed. What am I doing wrong? Thanks.

    Read the article

  • Maven2 compiles my tests, but doesn't run them

    - by Vincenzo
    I have a simple Maven2 project with tests written for TestNG. When I say mvn test Maven2 compiles my test, but don't run them. I already checked this page: http://maven.apache.org/general.html#test-property-name. This is not my case. Anybody can help? My directory structure: pom.xml src main java com ... test java com ... target classes <— .class files go there test-classes <— .class files with tests go there This is what I see if I run mvn -X test (end of the log): ... [INFO] Surefire report directory: <mydir>/target/surefire-reports Forking command line: /bin/sh -c cd <mydir> && /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java -jar /var/folders/+j/+jAx0g2xGA8-Ns9lWNOWgk+++TM/-Tmp-/surefirebooter7645642850235508331.jar /var/folders/+j/+jAx0g2xGA8-Ns9lWNOWgk+++TM/-Tmp-/surefire4544000548243268568tmp /var/folders/+j/+jAx0g2xGA8-Ns9lWNOWgk+++TM/-Tmp-/surefire7481499683857473873tmp ------------------------------------------------------- T E S T S ------------------------------------------------------- Running TestSuite Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.191 sec

    Read the article

  • Shared Variable Among Ruby Processes

    - by Jesse J
    I have a Ruby program that loads up two very large yaml files, so I can get some speed-up by taking advantage of the multiple cores by forking off some processes. I've tried looking, but I'm having trouble figuring how, or even if, I can share variables in different processes. The following code is what I currently have: @proteins = "" @decoyProteins = "" fork do @proteins = YAML.load_file(database) exit end fork do @decoyProteins = YAML.load_file(database) exit end p @proteins["LVDK"] P displays nil though because of the fork. So is it possible to have the forked processes share the variables? And if so, how?

    Read the article

  • How do you deal with the conflict between ActiveSupport::JSON and the JSON gem?

    - by Luke Francl
    I am stumped with this problem. ActiveSupport::JSON defines to_json on various core objects and so does the JSON gem. However, the implementation is not the same -- the ActiveSupport version takes arguments and the JSON gem version doesn't. I installed a gem that required the JSON gem and my app broke. The issue is that I'm using to_json in a controller that returns a list of objects, but I want to control which attributes are returned. When code anywhere in my system does require 'json' I get this error message: TypeError: wrong argument type Hash (expected Data) I tried a couple of things that I read online to fix it, but nothing worked. I ended up re-writing the gem to use ActiveSupport::JSON.decode instead of JSON.parse. This works but it's not sustainable...I can't be forking gems every time I want to use a gem that requires the JSON gem. Update: The best solution of this problem is to upgrade to Rails 2.3 or higher, which fixed it.

    Read the article

  • what does this code do?

    - by bstullkid
    It looks like this just sends a ping, but whats the point of that when you can just use ping? int main (int argc, char *argv[]) { unsigned int pid = 0; char buffer[2]; char *args[] = { "/bin/ping", "-c", "5", NULL, NULL }; if (argc != 2) return 0; args[3] = strdup(argv[1]); for (;;) { gets(buffer); /* FTW */ if (buffer[0] == 0x6e) break; switch (pid = fork()) { case -1: printf("Error Forking\n"); exit(255); case 0: execvp(args[0], args); exit(1); default: break; } } return 255; }

    Read the article

  • How can I start a TCP server in the background during a Perl unit test?

    - by John
    I am trying to write a unit test for a client server application. To test the client, in my unit test, I want to first start my tcp server (which itself is another perl file). I tried to start the TCP server by forking: if (! fork()) { system ("$^X server.pl") == 0 or die "couldn't start server" } So when I call make test after perl Makefile.PL, this test starts and I can see the server starting but after that the unit test just hangs there. So I guess I need to start this server in background and I tried the & at the end to force it to start in background and then test to continue. But, I still couldn't succeed. What am I doing wrong? Thanks.

    Read the article

  • double fork using vfork

    - by Oren S
    HI I am writing a part of a server which should dispatch some other child processes. Because I want to wait on some of the processes, and dispatch others without waiting for completion, I use double fork for the second kind of processes (thus avoiding the zombie processes). Problem is, my server holds a lot of memory, so forking takes a long time (even the copy-on-write fork used in Linux which copies only the paging tables) I want to replace the fork() with vfork(), and it's easy for the second fork (as it only calls execve() in the child), but I couldn't find any way I can replace the first one. Does anyone know how I can do that? Thanks! The server is a linux (RH5U4), written in C++.

    Read the article

  • What's the proper way to fork() in FastCGI ?

    - by eugene y
    I have an app running under Catalyst+FastCGI. And I want it to fork() to do some work in background. I used this code for plain CGI long ago: defined(my $pid = fork) or die "Can't fork: $!"; if ($pid) { # print response exit 0; } die "Can't start a new session: $!" if setsid == -1; close STDIN or die $!; close STDOUT or die $!; close STDERR or die $!; # do some work in background I tried some variations on this under FastCGI but with no success. How should forking be done under FastCGI?

    Read the article

  • How to launch Glassfish v3 without backgrounding

    - by jnorris
    Glassfish v3 is launched as follows: ./bin/asadmin start-domain <domain-name> This script eventually runs: exec "$JAVA" -jar "$AS_INSTALL_LIB/admin-cli.jar" "$@" admin-cli.jar eventually launches another process, effectively putting itself into the background. I would like to launch glassfish without putting itself in the background for the purpose of monitoring with daemontools (ie: svc). Is this possible? The documentation talks about using inittab here which seems like it would also require a way to launch it without forking or backgrounding so some other process (eg: inittab, evc, etc.) can watch the process id and restart it if it crashes. However, in this inittab example, is it using the same backgrounding cmd line, so I don't know how inittab can possibly respawn the process when it doesn't know what process id to watch. Am I missing something?

    Read the article

  • How can I make a Jeditable (jQuery) span activate editing on more than one event?

    - by JonathanHayward
    For the jQuery extension Jeditable, one of the parameters that can be specified is which DOM event will turn a div/span/... into a text input/textarea/... I would like to have more than one event serve as a trigger; that is, I would like either a click event or a contextmenu event to turn a span into an in-place edit area. Is there a graceful way to do this without forking Jeditable? --edit-- An example of code specifying the event is below. The parameter is optional, defaulting to a regular click. $(".edit_rightclick").editable("/ajax/save", { cancel: "Cancel", submit: "OK", tooltip: "Right click to edit.", event: "contextmenu", }); Calling twice, once for the regular click event with the event unspecified, and one for the contextmenu event (right-click if there are no switched mouse buttons or anything like that) does not seem to produce the intended effect of an element becoming editable in place on a click from either mouse button.

    Read the article

  • Multiple Rails forks with separate designs and layouts

    - by mettadore
    I have a Rails project that is basically a simple web app for a membership-based organization. We've open sourced the code on Github for the web app so that others can use it, but have a licensed design/layout that the original organization is going to use. This layout cannot be open sourced. I was wondering if others have run into the situation where you have an open-source Rails app with a non-OS design. My initial thought is to put app/views in .gitignore, and to have anyone forking the code add their own views directory, perhaps including an app/views_default directory with a web-app-theme layout or something else to get people running. Is this the best option (realizing that there are other files such as JavaScript, CSS, etc that come with the layout that must also be ignored). Does anyone have some good thoughts or pointers on this?

    Read the article

  • What happens to a SIGINT (^C) when sent to a perl script containing children?

    - by CmdrGuard
    I have a Perl script that forks. Each fork runs an external program, parses the output, and converts the output to a Storable file. The Storable files are then read in by the parent and the total data from each of the children are analyzed before proceeding onto a repeat of the previous fork or else the parent stops. What exactly happens when I issue a ^C while some of the children are still running the external program? The parent perl script was called in the foreground and, I presume, remained in the foreground despite the forking. Is the SIGINT passed to all children, that is, the parent, the parent's children, and the external program called by the children??

    Read the article

  • Is my way of doing threads in Android correct?

    - by Charlie
    Hi, I'm writing a live wallpaper, and I'm forking off two separate threads in my main wallpaper service. One updates, and the other draws. I was under the impression that once you call thread.start(), it took care of everything for you, but after some trial and error, it seems that if I want my update and draw threads to keep running, I have to manually keep calling their run() methods? In other words, instead of calling start() on both threads and forgetting, I have to manually set up a delayed handler event that calls thread.run() on both the update and draw threads every 16 milliseconds. Is this the correct way of having a long running thread? Also, to kill threads, I'm just setting them to be daemons, then nulling them out. Is this method ok? Most examples I see use some sort of join() / interrupt() in a while loop...I don't understand that one...

    Read the article

  • What to do if exec() fails?

    - by Grigory
    Let's suppose we have a code doing something like this: int pipes[2]; pipe(pipes); pid_t p = fork(); if(0 == p) { dup2(pipes[1], STDOUT_FILENO); execv("/path/to/my/program", NULL); ... } else { //... parent process stuff } As you can see, it's creating a pipe, forking and using the pipe to read the child's output (I can't use popen here, because I also need the PID of the child process for other purposes). Question is, what should happen if in the above code, execv fails? Should I call exit() or abort()? As far as I know, those functions close the open file descriptors. Since fork-ed process inherits the parent's file descriptors, does it mean that the file descriptors used by the parent process will become unusable?

    Read the article

  • Maintaining Logging and/or stdout/stderr in Python Daemon

    - by dave mankoff
    Every recipe that I've found for creating a daemon process in Python involves forking twice (for Unix) and then closing all open file descriptors. (See http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/ for an example). This is all simple enough but I seem to have an issue. On the production machine that I am setting up, my daemon is aborting - silently since all open file descriptors were closed. I am having a tricky time debugging the issue currently and am wondering what the proper way to catch and log these errors are. What is the right way to setup logging such that it continues to work after daemonizing? Do I just call logging.basicConfig() a second time after daemonizing? What's the right way to capture stdout and stderr? I am fuzzy on the details of why all the files are closed. Ideally, my main code could just call daemon_start(pid_file) and logging would continue to work.

    Read the article

  • SVN user guidelines

    - by Oliver Moran
    I have been tasked with writing a set of user guidelines for SVN for developers in my company. The guidelines are to be solely from a user perspective (e.g. commit comments, when to commit) and not from an administrative perspective (e.g. when to tag, how to structure). An administrative guideline will be written in a separate document. We are an app development house involved also in embedded development. So our developers range from HTML5 and Flash to Java and C. Some of our coding involves forking very large (millions of files) code bases. Other parts involve us engaging in ground-up development. Are there any best practices for use of SVN from a user (i.e. grunt developer) perspective?

    Read the article

  • Somewhere to get inspiration - Pair up the creative with the tech

    - by Morten Bergfall
    I am a somewhat green developer; some work experience, last year of school. As most of you, I am constantly working on an assortment of personal projects. Since my mind often has a somewhat drifting characteristic; I am not always able to keep the projects in check. After some time they all exhibit the moral fiber of Vikings, harlots and chain-letter-knitters. This includes constant forking, round-abouting, eating of school assignments of rather mundane, and hence pretty yawn-inducing, specifications, and of course quite a bit of gathering of folder dust. Well, on to my question....is there a place, forum... or something with the purpose of linking people with ideas to the people actually being able to bring said ideas to life? Of course, I know of the professional ones, like rent-a-coder and such. And there seem to be a lot of open source projects available for participation. What I'm looking for doesn't really fit into any of those categories....the form would be somewhat like rent-a-coder, but this is ideas&inspiration, not bubble-sort-my-quarterly-for-a-buck. The possibilities for developing bonds, spicy code, and plain old fun seem quite possible.As I see it, the main benefit would be that we (that is the tech-flipside of the proverbial eCoin) get something worthwhile to do, rather than squeeze the last creative grain out of our code-heavy brains.To give it some perspective...: My last project consists of an absurd jQuery-plugin that includes animated png-robots migrating from Google Earth to drag a html-element of your choosing onto the map, where it gets color, for so to be dragged back by this poorly animated robot.... Often, the line between the creative and the tech is blurred, to say the least. I wouldn't think that would be a problem. Think someone who has developed a nifty little windows application, then sees possibility for a broader use, perhaps some sort of networking functionality. This fellow sadly lacks the skill to implememet this. So he, she or it would then seek a developer with the know-how and they could complete this project together. So, do any of you know of such a place, or can nudge in the right direction? And yes, I understand completely that I should be dedicating myself to doing school work, or applying for mundane developer positions, so please.... :-) UPDATE Sadly, I'm situated in Oslo, Norway, and the number of developers are somewhat limited...and I have had quite some ahem personality issues with the ones who are available ;-) So I feel I must go deeper; search the multitude of the web...

    Read the article

  • git commit –m “CodePlex now supports Git!”

    Finally, yes, CodePlex now supports Git! Git has been one of the top rated requests from the CodePlex community for some time: Admittedly, when we launched CodePlex, we never expected that at some point we would be running a source control system originally invented by Linus Torvalds to use for the Linux kernel. Though I would also say, nobody would have thought the open source ecosystem would be as important to Microsoft as it has become now. Giving CodePlex users what they ask for and supporting their open source efforts has always been important to us, and we have a long list of improvements planned, so stay tuned as we have more up our sleeves! Why Git? So why Git? CodePlex already has Mercurial for distributed version control and TFS (which also supports subversion clients) for centralized version control. The short answer is that the CodePlex community voted, loud and clear, that Git support was critical. Additionally, we just like it, we use Git on our team every day and making the DVCS workflows more available to the CodePlex community is just the right thing to do. Forks and Pull Requests One of the capabilities that distributed version control systems, such as Mercurial and Git, enable is the Fork and Pull Request workflow.  Just like with Mercurial, projects configured to use Git enable Forking the source and submitting contributions back via Pull Requests. The Fork/Pull Request workflow is a key accelerator to many open source projects and you will see improvements in our support coming later this year. More Choice With the addition of Git, now CodePlex has three options when it comes to Open Source project hosting. Projects can now select between TFS, Mercurial, and Git. Each developer has their own preferences, and for some, centralized version control makes more sense to them. For others, DVCS is the only way to go. We’re equally committed to supporting both these technologies for our users. You can get started today by creating a new project or contribute to an existing project by creating a fork. For help on getting started with Git on CodePlex, see our help documentation here. If you would like to switch your project to use Git, please contact us at CodePlex Support with your project information, and we will be happy to help you out. We're Listening CodePlex is your community, and we want to deliver the experiences you need to have a successful open source project. We want your ideas and feedback to make CodePlex a great development community.  The issue tracker on CodePlex is publicly available. Add suggestions or vote up existing suggestions. And you can always find us on Twitter, I’m @mgroves84; follow us to keep up to date with our latest releases: @codeplex

    Read the article

  • Solaris SMF to Upstart on RHEL6

    - by aaa90210
    I am planning a migration from Solaris/x86 to RHEL6. Part of this migration will be migrating services from SMF to the RHEL6 equivalent, which appears to be upstart. While init.d scripts still seem to be supported, I want to take advantage of a more sophisticated init daemon, especially for features like job supervision (restarting etc). I would like to gather some thoughts on a few points: 1) Is upstart an adequate job supervisor, i.e. does it preclude the need for stand-alone managers like daemontools/supervise? 2) Upstart scripts seem very bare-bones compared to a typical init.d script. If I was porting an init.d script to Upstart, is it OK to just "exec /etc/init.d/myjob start"? This include RHEL installed programs like httpd. 3) Does upstart do anything is regards to pid files, and what are it's expectations in regards to the forking model of the process? 4) Are there any straightforward guides to the process management aspect of Upstart...and by that I mean the conditions around controlling restarting? e.g. how many times to restart the process before it goes into a maintenance state, or to ignore errors/core dumps in child processes of the supervised process. Any other relevant ideas or guides would be appreciated. TIA

    Read the article

  • Reading log files from web application

    - by Egorinsk
    I want to write a small PHP application for monitoring logs on a Debian server, including syslog logs and Apache/PHP messages. The problem here is that Apache user (www-data) has no access to /var/log directory. What would be the best way to grant an access to logs for PHP application? Let's assume that log files can be really large, like hundreds of megabytes. I have some ideas: Write a shell script that would be run via sudo and tail last 512 Kb of log into a separate file that can be read by application - that's ineffective, because of forking a new process and having to read data twice Add www-data to adm group (that can read logs) - that's insecure Start a PHP process via cron every minute to read logs — that's not very good, because it doesn't allow real-time monitoring. Also, this script will be started even when I don't read logs, and consume CPU time (server is in the cloud, and I'll have to pay for it) Create a hardlink for all log files with lowered permissions - I guess, that won't work because logrotate could recreate log files and they'll change inode number. Start a separate nginx/Apache server under privileged user that may read logs. Maybe anyone got a better solution?

    Read the article

  • Reading log files from web application

    - by Egorinsk
    Hi! I want to write a small PHP application for monitoring logs on a Debian server, including syslog logs and Apache/PHP messages. The problem here is that Apache user (www-data) has no access to /var/log directory. What would be the best way to grant an access to logs for PHP application? Let's assume that log files can be really large, like hundreds of megabytes. I have some ideas: Write a shell script that would be run via sudo and tail last 512 Kb of log into a separate file that can be read by application - that's ineffective, because of forking a new process and having to read data twice Add www-data to adm group (that can read logs) - that's insecure Start a PHP process via cron every minute to read logs — that's not very good, because it doesn't allow real-time monitoring. Also, this script will be started even when I don't read logs, and consume CPU time (server is in the cloud, and I'll have to pay for it) Create a hardlink for all log files with lowered permissions - I guess, that won't work because logrotate could recreate log files and they'll change inode number. Start a separate nginx/Apache server under privileged user that may read logs. Maybe anyone got a better solution?

    Read the article

  • Company wants to write custom project management tool, rather then use third party product.

    - by Jason Evans
    At the company I work, we are really wanting to get into the agile methodology for developing software. One thing that I'm not excited about is the fact that management wants us to build a custom project management feature inside the company's Intranet. I think this is a total waste of time. There are many great third party tools available (e.g. Axosoft OnTime) that can do everything we need, and more. For how much development time it would cost us to build our own project management module, we could buy numerous licences for a third party product. One concern is that, whilst we are writing code for a client, and using our custom Intranet project management module, we find bugs in the module that need fixing ASAP. That means having to stop work on the client code to fix the Intranet. That just puts shivers down my spine. Another worry I have is lack of functionality. This custom module is going to be so basic, that it will just feel really crap to use. That might sound a bit snooty, but for goodness sake, many third party tools are so feature rich, that the idea of having to write our own tool makes feel very uneasy. In fact, I can't be bothered. What do you guys think? I'm going to raise this issue with my boss, since I feel it's such an important topic to talk about. EDIT: Thanks for the great responses, much appreciated. To summarize some of them: Money Naturally my boss does want to save money, by not forking out a few hundred £'s for licences. However, for us to write a custom tool, it will take x number of days, multiplied by approx £500, which is our costs. I don't see the business value in this. Management have mentioned that they want to sell the Intranet as a product in the future, but it's so custom to our needs (and downright basic), that in order to give it to another client, I can see us having to fork a version of the code and rebuild the majority of it anyway. So it's not like we're gaining anything there in reuse. Features Having our own custom module means not feature bloat - only the functionality we require will be in the product. My issue is that there are plenty of free, open-source project management tools out there with minimal features already. So even if cost is an issue, we could look into open-source. Again it all boils down to the fact that I don't see the point in writing a project management tool in this day and age. It's a bit like writing your own web browser - why?, what's the point? Although management are asking for this tool, just because they are, it does not mean I'm going to please them and do it just because they asked for it. If something does not make sense, then I will raise it as a concern. At the end of the day, it's the developers who write the code, it's the developers who make money for a business. Thus, as far I'm concerned, the devs have a very big role in deciding how a company should manage projects and what tools are used. "I am Spartan, argh!" :) Hmm, I've not been able to make this question a wiki for some reason, thus I'm going to have to pick an answer to accept. Cheers. Jas.

    Read the article

  • R and version control for the solo data analyst

    - by Jeromy Anglim
    Many data analysts that I respect use version control. For example: http://github.com/hadley/ See comments on http://permut.wordpress.com/2010/04/21/revision-control-statistics-bleg/ However, I'm evaluating whether adopting a version control system such as git would be worthwhile. A brief overview: I'm a social scientist who uses R to analyse data for research publications. I don't currently produce R packages. My R code for a project typically includes a few thousand lines of code for data input, cleaning, manipulation, analyses, and output generation. Publications are typically written using LaTeX. With regards to version control there are many benefits which I have read about, yet they seem to be less relevant to the solo data analyst. Backup: I have a backup system already in place. Forking and rewinding: I've never felt the need to do this, but I can see how it could be useful (e.g., you are preparing multiple journal articles based on the same dataset; you are preparing a report that is updated monthly, etc) Collaboration: Most of the time I am analysing data myself, thus, I woudln't get the collaboration benefits of version control. There are also several potential costs involved with adopting version control: Time to evaluate and learn a version control system A possible increase in complexity over my current file management system However, I still have the feeling that I'm missing something. General guides on version control seem to be addressed more towards computer scientists than data analysts. Thus, specifically in relation to data analysts in circumstances similar to those listed above: Is version control worth the effort? What are the main pros and cons of adopting version control? What is a good strategy for getting started with version control for data analysis with R (e.g., examples, workflow ideas, software, links to guides)?

    Read the article

< Previous Page | 1 2 3 4 5  | Next Page >