brushtechnology / fabricate

The better build tool. Finds dependencies automatically for any language.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[PATCH] fixes a bug of matching chdir line

GoogleCodeExporter opened this issue · comments

What steps will reproduce the problem?
When running commands involving changing current directory, which generates 
chdir line(s) in strace output.

What is the expected output? What do you see instead?
The pid variable should be obtained from the chdir line, but instead it's not 
assigned when a chdir line is mathced, so its previous value is retained. This 
may not always cause a problem as its previous value has certain probability to 
be the same as the current value (when the previous line of strace output is 
from the same process). When the previous line of strace output is from a 
different process, the problem occurs and fabricate cannot keep track of 
correct current directory, eventually giving incorrect file list in the .deps 
file.

What version of the product are you using? On what operating system?
The problem appears in revision 157 from trunk of svn repository. It 
occasionally shows up in one of my Ubuntu machines.

Please provide any additional information below.
The problem can be fixed by the attached patch, which simply adds a line to 
assign to pid the value from the matched chdir line.

Original issue reported on code.google.com by wd...@wdeng.info on 26 Mar 2013 at 4:10

Attachments:

I have applied your fix to fabricate as it is obviously needed.

Available in r163


Original comment by simon.al...@gmail.com on 5 Apr 2013 at 11:06

  • Changed state: Fixed
  • Added labels: ****
  • Removed labels: ****