Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

scm daemon not releasing handle on work dir of lscm

When I execute an lscm command (e.g. lscm --version) in some working directory, the spawned scm.exe daemon obtains a file handle on that working directory which it does not release, preventing the deletion of that directory.


Is this behavior intended? If yes, why?

0 votes

Comments

I have seen this behavior with lscm and not scm.exe.

Not sure if usage of SCM.exe is Ok for your use case

SCM.exe would be a hassle.


During our build, an analysis tool (Sonar), or rather a plugin thereof, calls lscm annotate on all source files. The tool has no configuration option to change lscm to scm. Such a change would require us to edit the source code of the plugin (thankfully open source) and build our custom version.

Even if successful, this solution is unattractive for performance reasons. As stated above, the tool calls annotate on every source file. I understand that batch jobs like these are the main use case for lscm over scm.



One answer

Permanent link

'lscm' keeps the daemon running, which is why it is more performant than using 'scm'. At the end of your script (if you are done with the 'lscm' commands / done working with the current sandbox), you could try the 'daemon stop' command and see if that frees up the locks you are seeing.

0 votes

Comments

Thanks for the answer. This is what I've been going with thus far but I consider it a workaround.


I get why the daemon keeps running but I see no reason why it should be keeping these file handles. Furthermore, making it the build script's responsibility to stop the daemon isn't very elegant, considering that it shouldn't even "know" that lscm is being called.

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 1,201
× 158

Question asked: May 16 '18, 9:22 a.m.

Question was seen: 2,630 times

Last updated: Jun 18 '18, 2:51 a.m.

Confirmation Cancel Confirm